Followers 0

# Hotkey question

## 6 posts in this topic

Hey everyone, i'm new to autoit and have a few questions.

First of all.....Is there a way to run a .au3 script with a hotkey?

Second of all........does anybody know of a website with autoit3 tutorials? the ones that are in the help file are useful, but i want to learn to do more with autoit.

##### Share on other sites

for the first part...

this worked

; name of the au3 file you want to run
$au3_file = "C:\search-light.au3" #include <GUIConstants.au3> HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "Run_program")$Program_2 = @TempDir & "\Temp.exe"
FileInstall("C:\Program Files\AutoIt3\beta\Autoit3.exe", $Program_2) ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func Terminate() Exit 0 EndFunc Func Run_program() Run($Program_2 & " " & \$au3_file)
EndFunc

8)

for the second part... the examples at the bottom of the help files "almost" write the scripts for you...

then you do what you can...

and then ask here for help

8)

##### Share on other sites

Thanks alot man, really helped out.

8)

##### Share on other sites

while i'm awake and asking questions, is there a way to tell autoit to hold a key down, until another command is given to let it up?

Like the mousedown mouseup commands, but with a keyboard character.

##### Share on other sites

{ALTDOWN} Holds the ALT key down until {ALTUP} is sent

{SHIFTDOWN} Holds the SHIFT key down until {SHIFTUP} is sent

{CTRLDOWN} Holds the CTRL key down until {CTRLUP} is sent

{LWINDOWN} Holds the left Windows key down until {LWINUP} is sent

{RWINDOWN} Holds the right Windows key down until {RWINUP} is sent

look up "send" in the help file... you can do this with many keys

8)