Jump to content
Sign in to follow this  
Moja

HotKey -- Send

Recommended Posts

Moja

I did check the Help file under 'HotKeySet' but I couldn't really make much sense of what it was saying, so here's my question...

I want, when a key is pressed, say "L", for it to send a few commands, such as, Send("Whatever") etc. Can someone help me please?

Moja

Share this post


Link to post
Share on other sites
CyberSlug

HotKeySet does not suppport single letters of the alphabet, so L and Shift+L cannot be used. (Also some programs trap hotkeys and prevent AutoIt from interacting fully....) You can use Ctrl+L, Alt+L, Ctrl+Shift+L, Ctrl+Alt+L, or Ctrl+Shift+Alt+L or you can use a few single keys like Escape, Pause, F11

Example using Ctrl+L; press Esc to quit...

HotKeySet("{Esc}", "Terminate")
Func Terminate("{Esc}")
   Exit
EndFunc

HotKeySet("^l", "SendStuff")
Func SendStuff()
   Send("Whatever")
EndFunc

While 1
   sleep(100)
WEnd
Exit

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.