Sendkeys con programas tontos June 28, 2013
Posted by hackandfab in Uncategorized.trackback
Como automatizar programas ajenos en windows con Sendkeys
ej: meter esto en un fichero .txt y renombrarlo a .vbs
<code>
rem
rem Autoria, liencia y para que sirve.
rem
Set wshShell = CreateObject(“WScript.Shell”)
wshShell.Run wshShell.ExpandEnvironmentStrings(“””%PROGRAMFILES%\blabla\blabla\bla.exe”””)
rem en windows 7 %PROGRAMFILES(x86)%
Do Until Success = True
Success = wshShell.AppActivate(“nombre_de_la_ventana_no_del_ejecutable”)
Wscript.Sleep 1000
Loop
Wscript.Sleep 500
wshShell.SendKeys “{TAB}”
Wscript.Sleep 100
wshShell.SendKeys “{TAB}”
Wscript.Sleep 100
wshShell.SendKeys ” “
rem asi se envia un espacio
Wscript.Sleep 100
wshShell.SendKeys “Parrafada del copon”
</code>
http://msdn.microsoft.com/en-us/library/8c6yea83%28v=vs.84%29.aspx
Comments»
No comments yet — be the first.