Hey
Is it possible to create a "quick reload" function, meaning that upon "reload", it'll skip the auto excecated lines at the beginning of a script?
Thanks
Skip lines on reload
Re: Skip lines on reload
You could run the script with a command-line parameter and then check that parameter to see whether to run the auto-exec.
-
- Posts: 296
- Joined: 07 Nov 2020, 08:37
Re: Skip lines on reload
Do you mind giving me an example?
Re: Skip lines on reload
Code: Select all
#SingleInstance Force ; Run AutoHotkey.exe with command-line parameters: [script.ahk] /auto
If (A_Args.1 != "/auto") { ; Reloaded
Gosub, Show
Return
}
AutoExec: ; Not reloaded
a = 5
Show:
MsgBox, 64, % "Result with parameter = '" A_Args.1 "'", a = %a%`n`nAfter OK, press F4 to reload.
F4::Reload