I'm trying to write a script for SecureCRT in VBScript that sends keystrokes to automate some of my more repetitive tasks for me. Normally, all I have to do is press a couple of keys, but I'm trying to have a script press them for me.
The issue is that no matter how long I set the screen to wait for using crt.Sleep, it seems to do just wait, then press all of the keys at light speed.
In essence, my code looks like this:
crt.Screen.SendKeys "{TAB}"
crt.Sleep 10
crt.Screen.SendKeys "{TAB}"
crt.Sleep 10
crt.Screen.SendKeys "f"
crt.Sleep 10
crt.Screen.SendKeys "p"
crt.Sleep 10
crt.Screen.SendKeys "p"
crt.Sleep 10
crt.Screen.SendKeys "r"
crt.Sleep 10
crt.Screen.SendKeys "{F10}"
crt.Sleep 10
crt.Screen.SendKeys "{ENTER}"
crt.Sleep 250
crt.Screen.SendKeys "v"
crt.Sleep 10
crt.Screen.SendKeys "{F10}"
crt.Sleep 10
crt.Screen.SendKeys "{ENTER}"
crt.Sleep 250
(It's gross, I know—I originally had a function written to get rid of all the repetition, but I lost some of my progress)