Sign in to follow this  
Followers 0
RandomGuest

Hotkeys :O

4 posts in this topic

How can I make a hotkey...like when im Pushing A it will start a piece of script, not just like togglepause, is this possible, how? :)

Share this post


Link to post
Share on other sites



Search on the keyword "hotkey" within the Help file that came with AutoIt and see if that gives you any ideas.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

not just like togglepause

This implys to me that you have already read the help.

HotKeySet can be used to bind most any key to any function. Here is an example.

Hotkeyset("a", "RandomFunc") ; Binds hotkey "a" to a function titled "RandomFunc"

While 1;       \
    Sleep(100);-Give the script something to do while it waits for a hotkey
Wend;          /

Func RandomFunc() ; declares the "RandomFunc" function
     ;Whatever you want to do when hotkey is pressed goes here:
     Msgbox(0,"Hello","Hello from your function!!!"&@CRLF&'You Just Pressed "'&@Hotkeypressed&'"')
EndFunc
Edited by Paulie

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  
Followers 0