Hi
I have Multiple script that i have added to GUI. Is it possible to convert it to single EXE or is there any other way than to that.
Multiple Scripts
Re: Multiple Scrpits
AutoHotkey comes with a compiler. It will convert the whole script file to an EXE program file that you can run directly. Have fun!
Re: Multiple Scripts
Hallo,
no, multiple scripts cannot be compiled into one exe!
With Timers instead of the Loops full of Sleeps so popular with beginners, it is usually possible to produce a working single script.
no, multiple scripts cannot be compiled into one exe!
With Timers instead of the Loops full of Sleeps so popular with beginners, it is usually possible to produce a working single script.
Re: Multiple Scripts
Hi @Rohwedder,
What do you mean by timers instead of the loops full of sleeps?Rohwedder wrote: Hallo,
no, multiple scripts cannot be compiled into one exe!
With Timers instead of the Loops full of Sleeps so popular with beginners, it is usually possible to produce a working single script.
Re: Multiple Scripts
These are two loops which cannot run simultaneously because only one thread can be active per script:
If you need them simultaneously you use two scripts or these two timers which do the same as above loops also simultaneously:
Code: Select all
*q::
While, GetKeyState("q","P")
{
SendInput, H
Sleep, 500
SendInput, e
Sleep, 200
SendInput, l
Sleep, 500
SendInput, l
Sleep, 300
SendInput, o
Sleep, 100
SendInput, {Enter}
Sleep, 300
}
Return
*w::
While, GetKeyState("w","P")
{
SendInput, W
Sleep, 500
SendInput, o
Sleep, 200
SendInput, r
Sleep, 500
SendInput, l
Sleep, 300
SendInput, d
Sleep, 100
SendInput, {Enter}
Sleep, 100
}
Return
Code: Select all
*q::
IF QCount
Return
QKeys := ["H","e","l","l","o","Enter"]
QSleeps := [500,200,500,300,100,300], QCount := 0
QSendKeys:
Send,% "{" QKeys[QCount:=Mod(QCount,QKeys.Count())+1] "}"
SetTimer, QSendKeys,% GetKeyState("q","P")?QSleeps[QCount]:"Off"
Return
*w::
IF WCount
Return
WKeys := ["W","o","r","l","d","Enter"]
WSleeps := [500,200,500,300,100,100], WCount := 0
WSendKeys:
SendInput,% "{" WKeys[WCount:=Mod(WCount,WKeys.Count())+1] "}"
SetTimer, WSendKeys,% GetKeyState("w","P")?WSleeps[WCount]:"Off"
Return