Como puedo hacer un launcher asi, con VBS o con HTML, decidme

Iniciado por z3nth10n, 8 Diciembre 2012, 14:52 PM

0 Miembros y 1 Visitante están viendo este tema.

Eleкtro

Cita de: Seazoux en 14 Diciembre 2012, 18:59 PM
Vale, ahora, tengo un problema, tengo que guardar el este (HECHO), actualizar el body "UNA VEZ", ejecutar la funcion que tiene, y cerrar el launcher. xD xD

No me ha quedado claro lo que quieres hacer, que es eso de "este HECHO"?




Cita de: Seazoux en 14 Diciembre 2012, 18:59 PM
Tengo un onlick un <a href="#" onlick="tal">...
`puedo poner un <a> dentro de otro <a>?  :xD
:silbar: http://www.w3schools.com/tags/tag_a.asp

No soy experto en HTML pero creo que no se debe poder...




Cita de: Seazoux en 14 Diciembre 2012, 18:59 PM
Y si quiero leer la linea 2??? xDDDD Es que no tengo ganas de estar haciendo un TXT para cada troxo de texto xD  :P :P
Almacena cada línea en un array y usa la línea que quieras.

Linea(0)
Linea(1)
etc...


Código (vb) [Seleccionar]
Dim objFSO, Archivo, Linea, Array_Lineas

Archivo = "user.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Linea = objFSO.OpenTextFile(Archivo,1).ReadAll
Array_Lineas = Split(Linea,vbCrLf)

' Para mostrar la línea 1
wscript.echo Array_Lineas(0)

' Para mostrar la línea 2
wscript.echo Array_Lineas(1)

' Para mostrar la línea 3
wscript.echo Array_Lineas(2)

'etc...








z3nth10n

#51
Cita de: EleKtro H@cker en 14 Diciembre 2012, 19:41 PM
No me ha quedado claro lo que quieres hacer, que es eso de "este HECHO"?



:silbar: http://www.w3schools.com/tags/tag_a.asp

No soy experto en HTML pero creo que no se debe poder...



Almacena cada línea en un array y usa la línea que quieras.

Linea(0)
Linea(1)
etc...


Código (vb) [Seleccionar]
Dim objFSO, Archivo, Linea, Array_Lineas

Archivo = "user.txt"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Linea = objFSO.OpenTextFile(Archivo,1).ReadAll
Array_Lineas = Split(Linea,vbCrLf)

' Para mostrar la línea 1
wscript.echo Array_Lineas(0)

' Para mostrar la línea 2
wscript.echo Array_Lineas(1)

' Para mostrar la línea 3
wscript.echo Array_Lineas(2)

'etc...


Muy bonito  y para escribir?  :) :) :)

LOL no entiendo porque dices que no entiendes de VBS y no sabes programar si si sabes xd  ;-) ;-) ;-)




Hola Nov xD Llevamos 51 mensajes ya xDDDD  :P :P




Editando por mi propia cuenta, como no quiero hacer un archivo bat para abrir una pagina web encontre esto:

Citar<script languaje="VBScript">
Function; link1()
Set wshShell = WScript.CreateObject ("WSCript.shell")
wshShell.Run "http://foro.elhacker.net/"
End Function
</script>

Que basicamente sirve para abrir con el navegador predeterminado un link

Ahora el error es este:



Hay puse donde deberia ir el ; ese.

;)




Editando editando, ahora me sale que: link1 no está definido  :laugh:

Interesados hablad por Discord.

Eleкtro

CitarFunction; link1()
:huh: el code funciona perfectamente sin el punto-y-coma.

Saludos








z3nth10n

#53
Cita de: EleKtro H@cker en 14 Diciembre 2012, 20:20 PM
:huh: el code funciona perfectamente sin el punto-y-coma.

Saludos

A ver, yo no le he puesto esto, es que dice que se espera ; xD

Es decir que esta mal puesto, ademas el code no funciona bien xD




Wihi! Lo arregle:


<script type="text/javascript">
 function openURL()
 {
     var shell = new ActiveXObject("WScript.Shell");
     shell.run("http://www.google.com");
 }
 </script>


<input type="button" value="Abrir" onlick="openURL()">

LOL  ;) ;)




Ya hice algo de mi parte, podrias tu hacerme el codigo de editar textos por lineas?

Gracias. :P

Interesados hablad por Discord.

z3nth10n

#54
Tengo un pequeño problema, y es que en cadena todo no funciona bien, es decir se ejecuta y todo eso, pero no se porque el texto no se mete en el archivo, cvoy a darle mas tiempo para que se cierre a ver si hace algo.  :¬¬




Le aumente un poco el tiempo pero nada.

Codigo:

http://pastebin.com/5PiCDu9h

Lineas del error:

Código (vb) [Seleccionar]

<!-- Botones del menu -->

<script language="VBScript">
Function ejecutar()
set objshell = createobject("wscript.shell")
appdata = objshell.expandenvironmentstrings("%APPDATA%")
objshell.run appdata & "\Ikillnukes\RUN.bat"
End Function

Function opciones()
set objshell = createobject("wscript.shell")
appdata = objshell.expandenvironmentstrings("%APPDATA%")
objshell.run appdata & "\Ikillnukes\OPT.hta"
End Function

Function test()
       strLine = document.getElementById("username").value
       Set objFSO = CreateObject("Scripting.FileSystemObject")
       Set objTextFile = objFSO.OpenTextFile("User.txt", 2, True) 
       objTextFile.WriteLine(strLine)
       objTextFile.Close
   End Function
Function runear()
setTimeout "ejecutar()",1000
End Function
</script>

<!-- Cerrar ventana -->

<script languaje="Javacript">
function salir() {
setTimeout('window.close()',2000)
}
</script>

<!-- Centrar ventana y leer User -->

<script language="VBScript">
      Sub Window_Onload
          strComputer = "."
          Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
          Set colItems = objWMIService.ExecQuery("Select * From Win32_DesktopMonitor")
          For Each objItem in colItems
              intHorizontal = objItem.ScreenWidth
              intVertical = objItem.ScreenHeight
          Next
          intLeft = (intHorizontal - 510) / 2
          intTop = (intVertical - 430) / 2
          window.resizeTo 510,430
          window.moveTo intLeft, intTop

          ' Aquí lees la linea del archivo de texto
           set objFileToRead = CreateObject("Scripting.FileSystemObject").OpenTextFile("User.txt",1)
           strLine = objFileToRead.ReadLine()
           objFileToRead.Close

           document.getElementById("username").value = strLine
      End Sub
   </script>

Interesados hablad por Discord.

z3nth10n

#55
Yalo arregle, ahora tengo otro problema:

For Each instance In GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem")
wscript.echo "Total Memory: " & Round(instance.TotalPhysicalMemory / 1048576, 0) & "MB"
Next

lo quiero poner en un html:

seria algo así:

For Each instance In GetObject("winmgmts:").InstancesOf("Win32_ComputerSystem")
document.write("Total Memory: " & Round(instance.TotalPhysicalMemory / 1048576, 0) & "MB")
Next


Pero nada. xD

Interesados hablad por Discord.

Eleкtro









z3nth10n

#57
Cita de: EleKtro H@cker en 22 Diciembre 2012, 14:26 PM
@Seazoux, ya arreglaste el último problema?

Yep.  ;)




Elektrooorl, dime como seria que no tengo npi :P

Interesados hablad por Discord.

Eleкtro

Cita de: Seazoux en 22 Diciembre 2012, 15:06 PM
Elektrooorl, dime como seria que no tengo npi :P

¿Pero no lo habías arreglado dijiste? xD

Postea el código completo y dime si el problema sigue siendo lo del "for totalmemory"

saludos








z3nth10n

Cita de: EleKtro H@cker en 22 Diciembre 2012, 18:05 PM
¿Pero no lo habías arreglado dijiste? xD

Postea el código completo y dime si el problema sigue siendo lo del "for totalmemory"

saludos

Ah nooooo, yo me refiero al ultimo problema si no al siguiente....  :laugh: :laugh: :xD

Interesados hablad por Discord.