Jump to content

HotKey -- Send


Recommended Posts

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

Link to comment
Share on other sites

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!
Link to comment
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
 Share

  • Recently Browsing   0 members

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