Sign in to follow this  
Followers 0
allstar550

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.

Thanks in Advance ~allstar550~

Share this post


Link to post
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)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks alot man, really helped out. :P

Share this post


Link to post
Share on other sites

your welcome

8)


NEWHeader1.png

Share this post


Link to post
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 this post


Link to post
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)


NEWHeader1.png

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