elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.


Tema destacado: ¿Eres usuario del foro? Ahora tienes un Bot con IA que responde preguntas. Lo puedes activar en tu Perfil


  Mostrar Mensajes
Páginas: 1 ... 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 [1007] 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 ... 1262
10061  Programación / Scripting / Re: .batch resetear modem en: 12 Enero 2013, 14:51 pm
Si tu IP es estática siempre puedes usar un proxy gratis, o esperar a que tu ISP te renueve la IP (A mi a los 30 días o así me la cambian xD).

http://ultrasurf.us/
10062  Programación / .NET (C#, VB.NET, ASP) / Re: Option Strict on no permtite el enlace en tiempo de ejecucion en: 11 Enero 2013, 21:57 pm
Si quieres un consejo, usa esto:

Código
  1.    '  RegCreateKey(Registry.CurrentUser, "Software\MyProgram")
  2.    '  RegDeleteKey(Registry.CurrentUser, "Software\MyProgram")
  3.    '  RegDeleteValue(Registry.CurrentUser, "Software\MyProgram", "Value name")
  4.    '  RegSetValue("HKEY_CURRENT_USER\Software\MyProgram", "Value name", "Data", RegistryValueKind.String)
  5.    '  Dim RegValue = RegGetValue("HKEY_CURRENT_USER\Software\MyProgram", "Value name"))
  6.  
  7. #Region "Registry Edit"
  8.  
  9.    Public Sub RegCreateKey(ByVal RegRoot As Microsoft.Win32.RegistryKey, ByVal RegKey As String)
  10.        RegRoot.CreateSubKey(RegKey)
  11.        RegRoot.Close()
  12.    End Sub
  13.  
  14.    Public Sub RegDeleteKey(ByVal RegRoot As Microsoft.Win32.RegistryKey, ByVal RegKey As String)
  15.        RegRoot.DeleteSubKey(RegKey)
  16.        RegRoot.Close()
  17.    End Sub
  18.  
  19.    Public Sub RegDeleteValue(ByVal RegRoot As Microsoft.Win32.RegistryKey, ByVal RegKey As String, ByVal RegValue As String)
  20.        Using key As Microsoft.Win32.RegistryKey = RegRoot.OpenSubKey(RegKey, True)
  21.            key.DeleteValue(RegValue)
  22.            key.Close()
  23.        End Using
  24.    End Sub
  25.  
  26.    Public Sub RegSetValue(ByVal RegKey As String, ByVal RegValue As String, ByVal RegData As String, ByVal RegDataType As RegistryValueKind)
  27.        My.Computer.Registry.SetValue(RegKey, RegValue, RegData, RegDataType)
  28.    End Sub
  29.  
  30.    Public Function RegGetValue(ByVal RegKey As String, ByVal RegValue As String)
  31.        Return My.Computer.Registry.GetValue(RegKey, RegValue, Nothing)
  32.    End Function
  33.  
  34. #End Region

Saludos
10063  Media / Diseño Gráfico / Re: Busco iconos de años (50s,60s,70s,80s,90s,2000,2001,2002,etc...) en: 11 Enero 2013, 20:09 pm
lo que quiero es que sigan un estilo de imagen específico


Si me bajo una imagen que es complétamente azul cielo, y otra que es todo verde lima, pues el contraste de los botones no cuadra, queda mal y poco profesional, a eso me refiero con seguir un patrón de colores :P

Creo que jamás conseguiré este tipo de imagenes xD

Saludos.
10064  Programación / Scripting / Re: Como puedo hacer un launcher asi, con VBS o con HTML, decidme en: 11 Enero 2013, 20:05 pm
[APORTE] MEGA-PACK para iniciarse en VS2012 x64 (Instalador + Recursos + Tools)
10065  Programación / .NET (C#, VB.NET, ASP) / Re: Como veo el standardoutput de la CMD en la própia CMD? en: 11 Enero 2013, 15:27 pm
Demasiado bueno para ser cierto, leer, escribir, y sin cerrarse la CMD

Pero... ¿Hay forma de modificar el SUB OutPutDataArrival para hacerlo funcionar en un WinForm?

gracias
10066  Programación / Scripting / Re: Como puedo hacer un launcher asi, con VBS o con HTML, decidme en: 11 Enero 2013, 14:06 pm
Dime un codigo snippet que yo use en el Launcher. Gracias :p

Cualquiera de los códigos que hayas copiado de internet.

Saludos
10067  Programación / Scripting / Re: Como puedo hacer un launcher asi, con VBS o con HTML, decidme en: 11 Enero 2013, 12:42 pm
que son snippets?

Son trozos de códigos reutilizables, suelen ser funciones o subrutinas que tienen un propósito en especial.

Saludos!

EDITO:

Código:
objshell.run """" & appdata & "\Ikillnukes\OPT.hta" & """"

No he probado la orden (no me suena que la variable se use de esa manera en VBS), pero vaya esa es la sintaxis para las comillas dobles.
10068  Programación / Scripting / Re: Como puedo hacer un launcher asi, con VBS o con HTML, decidme en: 11 Enero 2013, 11:19 am
700 líneas de código para hacer un maldito launcher, y las líneas que faltan para acabarlo...

Si es que es una locura de código, como tu dices has cojido varios snippets, los has colocado y los has editado un poco,
yo tambíen uso muchas veces snippets de internet para ahorrarme el trabajo de hacerlo a mano, pero joder, hay que saber un poco lo que estás usando, hay código de JS, VBS, CSS y HTML, y no sabes casi nada de ninguno de los 4 lenguajes, lo digo sin ofender, es que no sé para que te metes a usar 4 lenguajes si los desconoces.

En fín, es una completa locura de código, como para encontrar el error, aunque alguien te arreglase el código un poco mañana te saldrían 50 errores más por la forma en la que haces las cosas, y aquí estamos para ayudar y enseñar, pero con un arreglo ni aprendes bien ni se arregla :xD.

Te repito mi consejo, hazlo en VB.NET, (en un par de líneas se hace), ya lo habrías terminado, deja de complicarte.





Te voy a decir las cosas que encuentro echándole un vistazo en el editor (no pienso esforzarme mucho en buscar errores)



Código:
objshell.run appdata & "\Ikillnukes\RUN.bat"
objshell.run appdata & "\Ikillnukes\OPT.hta"
A menos que cierres el argumento completo con comillas, cualquier usuario que tenga espacios en el nombre de la ruta no le funcionará.



Código:
Function runear()
setTimeout "ejecutar()",1000
End Function
Deberías buscar en Google lo que es una función, en tu HTA usas para todo funciones de VBS cuando estas no devuelven ningún valor, funcionar funcionan como un sub, pero es muy incorrecto lo que estás haciendo.



Cada pequeño código que veo de VBS lo separas en bloques, ¿Y si empiezas por juntar todos los VBS en un solo bloque?:
Código:
 <script type="text/javascript">
    TODOS los códigos de VBS aquí, comentados y organizados.
  </script>

Y lo mismo con los de JS y CSS.

Saludos!
10069  Programación / .NET (C#, VB.NET, ASP) / Como veo el standardoutput de la CMD en la própia CMD? en: 11 Enero 2013, 10:29 am
Estoy intentando hacer pruebas,

Lo que quiero es poder abrir un comando en la CMD y que la consola no se cierre, por ejemplo:

Código
  1.  My_Process_Info.FileName = "CMD.exe"
  2.        My_Process_Info.Arguments = "/k pause"

Pero la CMD se cierra.

Así que he intentado ejecutar un FOR de Batch muy largo en la CMD para ver si así no se cierra...
Código
  1.        My_Process_Info.FileName = "CMD.exe" ' Process filename
  2.        My_Process_Info.Arguments = "/k For /L %a in (1,1,100000) do echo afijgifjigjfgjifjgi" ' Process arguments

y no, no se cierra (Porque el FOR tarda en finalizar, cuando acaba si que se cierra claro xD) pero ahora lo que ocurre además es que el output de la CMD no se muestra en la CMD!, es decir, el FOR no muestra nada.

EDITO: Vale, he descubierto que el output no se muestra en la CMD porque al habilitar la propiedad de redireccionar el Standard u Error output, no muestra el output en la CMD.


Así que quiero solucionar los dos problemas:

1. Que la CMD no se cierre cuando finaliza la orden, el comando.
2. Que el output se muestre en la CMD cuando habilito la propiedad RedirectStandardOutput = True  y/o RedirectStandardError = True




Este es el code, es un snippet que estoy intentando hacer:
Código
  1. Dim My_Process As New Process()
  2.        Dim My_Process_Info As New ProcessStartInfo()
  3.  
  4.        My_Process_Info.FileName = "CMD.exe" ' Process filename
  5.        My_Process_Info.Arguments = "/k For /L %a in (1,1,100000) do echo afijgifjigjfgjifjgi" ' Process arguments
  6.        My_Process_Info.UseShellExecute = False ' Don't use system shell to execute the process
  7.        My_Process_Info.CreateNoWindow = False ' Show the CMD Window
  8.        My_Process_Info.RedirectStandardOutput = True '  Redirect (1) Output
  9.        My_Process_Info.RedirectStandardError = True ' Redirect non (1) Output
  10.        My_Process.EnableRaisingEvents = True
  11.        My_Process.StartInfo = My_Process_Info
  12.        My_Process.Start() ' Run the process
  13.        My_Process.WaitForExit() ' Wait X miliseconds to kill the process
  14.  
  15.        Dim Process_StandardOutput = My_Process.StandardOutput.ReadToEnd() ' Stores the Standard Output (If any)
  16.        Dim Process_ErrorOutput = My_Process.StandardOutput.ReadToEnd() ' Stores the Error Output (If any)
  17.        Dim Process_StartTime As String = My_Process.StartTime ' Stores the time when the process was launched
  18.        Dim Process_EndTime As String = My_Process.ExitTime ' Stores the time when the process was finished
  19.        Dim ERRORLEVEL = My_Process.ExitCode ' Stores the ExitCode of the process
  20.  
  21.        Dim result = Process_StartTime & vbNewLine & Process_EndTime & vbNewLine & ERRORLEVEL
  22.  
  23.        MsgBox(result)
  24.        MsgBox(Process_StandardOutput)
  25.        MsgBox(Process_ErrorOutput)
10070  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Snippets (ACTUALIZADO 11/01/2013) en: 11 Enero 2013, 09:39 am
Para una aplicación necesité dividir el tamaño de unos MEgaBytes entre la capacidad de un DVD5, así que ya puestos he hecho este snippet que divide el tamaño entre varios formatos de discos, para la próxima ocasión.

PD: Las medidas están sacadas de la Wikipedia, para los más...  :-X

Saludos.

Código
  1.    ' Usage:
  2.    '
  3.    ' MsgBox(ConvertToDiscSize(737280000, "Bytes", "CD"))
  4.    ' MsgBox(ConvertToDiscSize(700, "MB", "CD"))
  5.    ' MsgBox(Math.Ceiling(ConvertToDiscSize(6.5, "GB", "DVD")))
  6.    ' MsgBox(ConvertToDiscSize(40, "GB", "BR").ToString.Substring(0, 3) & " Discs")
  7.  
  8. #Region " Convert To Disc Size function"
  9.    Private Function ConvertToDiscSize(ByVal FileSize As Double, ByVal FileKindSize As String, ByVal To_DiscKindCapacity As String)
  10.  
  11.        ' KindSize Measures:
  12.        ' --------------------------
  13.        ' Bytes
  14.        ' KB
  15.        ' MB
  16.        ' GB
  17.  
  18.        ' ToDiscKind Measures:
  19.        ' -----------------------------
  20.        ' CD
  21.        ' CD800
  22.        ' CD900
  23.        ' DVD
  24.        ' DVD-DL
  25.        ' BR
  26.        ' BR-DL
  27.        ' BR-3L
  28.        ' BR-4L
  29.        ' BR-MD
  30.        ' BR-MD-DL
  31.  
  32.  
  33.        ' Bytes
  34.        If FileKindSize.ToUpper = "BYTES" Then
  35.            If To_DiscKindCapacity.ToUpper = "CD" Then Return FileSize / 737280000 ' CD Standard
  36.            If To_DiscKindCapacity.ToUpper = "CD800" Then Return FileSize / 829440393.216 ' CD 800 MB
  37.            If To_DiscKindCapacity.ToUpper = "CD900" Then Return FileSize / 912383803.392 ' CD 900 MB
  38.            If To_DiscKindCapacity.ToUpper = "DVD" Then Return FileSize / 4700000000 ' DVD Standard (DVD5
  39.            If To_DiscKindCapacity.ToUpper = "DVD-DL" Then Return FileSize / 8500000000 ' DVD Double Layer (DVD9)
  40.            If To_DiscKindCapacity.ToUpper = "BR" Then Return FileSize / 25025314816 ' BluRay Standard
  41.            If To_DiscKindCapacity.ToUpper = "BR-DL" Then Return FileSize / 50050629632 ' BluRay Double Layer
  42.            If To_DiscKindCapacity.ToUpper = "BR-3L" Then Return FileSize / 100103356416 ' BluRay x3 Layers
  43.            If To_DiscKindCapacity.ToUpper = "BR-4L" Then Return FileSize / 128001769472 ' BluRay x4 Layers
  44.            If To_DiscKindCapacity.ToUpper = "BR-MD" Then Return FileSize / 7791181824 ' BluRay MiniDisc Standard
  45.            If To_DiscKindCapacity.ToUpper = "BR-MD-DL" Then Return FileSize / 15582363648 ' BluRay MiniDisc Double Layer
  46.  
  47.            ' KB
  48.        ElseIf FileKindSize.ToUpper = "KB" Then
  49.            If To_DiscKindCapacity.ToUpper = "CD" Then Return FileSize / 720000 ' CD Standard
  50.            If To_DiscKindCapacity.ToUpper = "CD800" Then Return FileSize / 810000.384 ' CD 800 MB
  51.            If To_DiscKindCapacity.ToUpper = "CD900" Then Return FileSize / 890999.808 ' CD 900 MB
  52.            If To_DiscKindCapacity.ToUpper = "DVD" Then Return FileSize / 4589843.75 ' DVD Standard (DVD5)
  53.            If To_DiscKindCapacity.ToUpper = "DVD-DL" Then Return FileSize / 8300781.25 ' DVD Double Layer (DVD9)
  54.            If To_DiscKindCapacity.ToUpper = "BR" Then Return FileSize / 24438784 ' BluRay Standard
  55.            If To_DiscKindCapacity.ToUpper = "BR-DL" Then Return FileSize / 48877568 ' BluRay Double Layer
  56.            If To_DiscKindCapacity.ToUpper = "BR-3L" Then Return FileSize / 97757184 ' BluRay x3 Layers
  57.            If To_DiscKindCapacity.ToUpper = "BR-4L" Then Return FileSize / 125001728 ' BluRay x4 Layers
  58.            If To_DiscKindCapacity.ToUpper = "BR-MD" Then Return FileSize / 7608576 ' BluRay MiniDisc Standard
  59.            If To_DiscKindCapacity.ToUpper = "BR-MD-DL" Then Return FileSize / 15217152 ' BluRay MiniDisc Double Layer
  60.  
  61.            ' MB
  62.        ElseIf FileKindSize.ToUpper = "MB" Then
  63.            If To_DiscKindCapacity.ToUpper = "CD" Then Return FileSize / 703.125 ' CD Standard
  64.            If To_DiscKindCapacity.ToUpper = "CD800" Then Return FileSize / 791.016 ' CD 800 MB
  65.            If To_DiscKindCapacity.ToUpper = "CD900" Then Return FileSize / 870.117 ' CD 900 MB
  66.            If To_DiscKindCapacity.ToUpper = "DVD" Then Return FileSize / 4482.26929 ' DVD Standard (DVD5)
  67.            If To_DiscKindCapacity.ToUpper = "DVD-DL" Then Return FileSize / 8106.23169 ' DVD Double Layer (DVD9)
  68.            If To_DiscKindCapacity.ToUpper = "BR" Then Return FileSize / 23866 ' BluRay Standard
  69.            If To_DiscKindCapacity.ToUpper = "BR-DL" Then Return FileSize / 47732 ' BluRay Double Layer
  70.            If To_DiscKindCapacity.ToUpper = "BR-3L" Then Return FileSize / 95466 ' BluRay x3 Layers
  71.            If To_DiscKindCapacity.ToUpper = "BR-4L" Then Return FileSize / 122072 ' BluRay x4 Layers
  72.            If To_DiscKindCapacity.ToUpper = "BR-MD" Then Return FileSize / 7430.25 ' BluRay MiniDisc Standard
  73.            If To_DiscKindCapacity.ToUpper = "BR-MD-DL" Then Return FileSize / 14860.5 ' BluRay MiniDisc Double Layer
  74.  
  75.            ' GB
  76.        ElseIf FileKindSize.ToUpper = "GB" Then
  77.            If To_DiscKindCapacity.ToUpper = "CD" Then Return FileSize / 0.68665 ' CD Standard
  78.            If To_DiscKindCapacity.ToUpper = "CD800" Then Return FileSize / 0.77248 ' CD 800 MB
  79.            If To_DiscKindCapacity.ToUpper = "CD900" Then Return FileSize / 0.84972 ' CD 900 MB
  80.            If To_DiscKindCapacity.ToUpper = "DVD" Then Return FileSize / 4.37722 ' DVD Standard (DVD5)
  81.            If To_DiscKindCapacity.ToUpper = "DVD-DL" Then Return FileSize / 7.91624 ' DVD Double Layer (DVD9)
  82.            If To_DiscKindCapacity.ToUpper = "BR" Then Return FileSize / 23.30664 ' BluRay Standard
  83.            If To_DiscKindCapacity.ToUpper = "BR-DL" Then Return FileSize / 46.61328 ' BluRay Double Layer
  84.            If To_DiscKindCapacity.ToUpper = "BR-3L" Then Return FileSize / 93.22852 ' BluRay x3 Layers
  85.            If To_DiscKindCapacity.ToUpper = "BR-4L" Then Return FileSize / 119.21094 ' BluRay x4 Layers
  86.            If To_DiscKindCapacity.ToUpper = "BR-MD" Then Return FileSize / 7.2561 ' BluRay MiniDisc Standard
  87.            If To_DiscKindCapacity.ToUpper = "BR-MD-DL" Then Return FileSize / 14.51221 ' BluRay MiniDisc Double Layer
  88.        End If
  89.  
  90.        Return Nothing ' Argument measure not found
  91.  
  92.    End Function
  93. #End Region
Páginas: 1 ... 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 [1007] 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 ... 1262
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines