ayuda sobre un vbscript send key
Publicado por eduardo corvera (1 intervención) el 15/10/2013 18:54:05
Bueno en primera, Hola xD!>.. mi pregunta o duda es la siguiente..
actualmente me he interesado bastante en esto de las computadoras soe un novato en su totalidad. pero veamos aca tengo una duda con un script de tecladoo.. veran estos es loq ue tengo................
Set WshShell = WScript.CreateObject("WScript.Shell")
TimeOut = 5000 ' En MiliSegundos
While TimeOut = TimeOut
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{I}"
WshShell.SendKeys "{M}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{W}"
WshShell.SendKeys "{A}"
WshShell.SendKeys "{T}"
WshShell.SendKeys "{C}"
WshShell.SendKeys "{H}"
WshShell.SendKeys "{I}"
WshShell.SendKeys "{N}"
WshShell.SendKeys "{G}"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
Wend
Como veran tengo entendido que el primer timeout que esta escrito en negritas es el tiempo en espera de ejecutar cada bloque de comando. esto quiere decir que si tengo 5000ms. para cada secuencia tarda 5 segundos, el time out. subrayado aun no tengo bien entendido cual es su funcion he leido que ps es el tiempo en que duerme la ejecucion pero no tengo claro o no entiendo alo que se refiere.. acomo puedes ver. la secuencias marcan algunos numeros en este caso. "3" "4" "6" "SPACE" y una letra e. esas son las teclas que quiero mandar pulsar en mi ordenador. pero cuando decido ejecutar el archivo lo haceee muy rapidoooo,, pulsa las teclas a un velocidad muy rapidaaa. esa e smi duda como hace para cada tecla tenga un limite de espera y un ritmo de pulsacion por segundo. osea quiero que cada tecla de esa secuencia se mande por segundo.... si me pueden ayudar se lo agradeceria ... o algun tutorial que lo pueda explikar o me ayude a crear algun otro,
actualmente me he interesado bastante en esto de las computadoras soe un novato en su totalidad. pero veamos aca tengo una duda con un script de tecladoo.. veran estos es loq ue tengo................
Set WshShell = WScript.CreateObject("WScript.Shell")
TimeOut = 5000 ' En MiliSegundos
While TimeOut = TimeOut
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{I}"
WshShell.SendKeys "{M}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{W}"
WshShell.SendKeys "{A}"
WshShell.SendKeys "{T}"
WshShell.SendKeys "{C}"
WshShell.SendKeys "{H}"
WshShell.SendKeys "{I}"
WshShell.SendKeys "{N}"
WshShell.SendKeys "{G}"
WshShell.SendKeys "{ENTER}"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{4}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{6}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{e}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WScript.Sleep(TimeOut - 1000)
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{3}"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
WshShell.SendKeys "{ }"
Wend
Como veran tengo entendido que el primer timeout que esta escrito en negritas es el tiempo en espera de ejecutar cada bloque de comando. esto quiere decir que si tengo 5000ms. para cada secuencia tarda 5 segundos, el time out. subrayado aun no tengo bien entendido cual es su funcion he leido que ps es el tiempo en que duerme la ejecucion pero no tengo claro o no entiendo alo que se refiere.. acomo puedes ver. la secuencias marcan algunos numeros en este caso. "3" "4" "6" "SPACE" y una letra e. esas son las teclas que quiero mandar pulsar en mi ordenador. pero cuando decido ejecutar el archivo lo haceee muy rapidoooo,, pulsa las teclas a un velocidad muy rapidaaa. esa e smi duda como hace para cada tecla tenga un limite de espera y un ritmo de pulsacion por segundo. osea quiero que cada tecla de esa secuencia se mande por segundo.... si me pueden ayudar se lo agradeceria ... o algun tutorial que lo pueda explikar o me ayude a crear algun otro,
Valora esta pregunta


0