Jump to content

Recommended Posts

Posted

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

Posted (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 by cmallett
Posted (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 by cmallett
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...