seraphant Posted February 21, 2004 Posted February 21, 2004 is there a way to make the script respond to user keystrokes? i.e the script im making goes out of synch and becomes more or less useless if th user messes with the keyboard. I need a way to use the Send command to respond to the user. ~Sera
Beastmaster Posted February 21, 2004 Posted February 21, 2004 AutoHotKey (aka AHK, which is an AutoIt2 derivative) provides a bunch of keyboard controls, such as GetKeyState. Check it out.BTW: You can use your existing A2 scripts with AHK !
cmallett Posted February 21, 2004 Posted February 21, 2004 (edited) Both AutoIt3 and AutoHotkey provide protection against the user physically pressing or releasing keys during a Send operation. There is a v2 to v3 script translator that can do some of the work for you if you want to convert to v3.Alternatively, if you're using NT/2k/XP, AutoHotkey in particular has a keyboard hook which keeps track of exactly what keys the user is physically holding down and uses that info to automatically compensate during the Send operation (even if the user releases or presses multiple keys while the send is ongoing). If you need that ultimate level of protection (above and beyond the basic protection already present), you can use the #InstallKeybdHook command. Edited February 21, 2004 by cmallett
cmallett Posted February 25, 2004 Posted February 25, 2004 (edited) That's an interesting idea and might work in some cases. But most of the common cases involve the user pressing a hotkey to trigger the Send operation. If BlockInput were turned on while the user is holding down keys, I suspect the state of the keys might get messed up. It's worth further investigating, however, so I'll check it out. Thanks. Edited February 25, 2004 by cmallett
Recommended Posts