I have a script at c:\scripts\script.ahk. If I execute the command "c:\scripts\script.ahk" using Windows' Run command dialog box, it loads the script or reloads it if it's already running. Is there a command I could execute to suspend the script? Maybe something like "c:\scripts\script.ahk -s" (I'm just making up something halfway plausible)?
Thanks.
Can I suspend a script by running a specific command using Windows' Run command dialog box?
-
- Posts: 44
- Joined: 15 Jul 2018, 16:29
Re: Can I suspend a script by running a specific command using Windows' Run command dialog box?
I don't see any command line parameters working if you use the script to start. It has at least to be an executable file. But maybe tell me a little more what you want to archieve
Also I just looked for suspend in ahk documentation. You can use something like this to toggle suspend or has it to be the run dialog?
Also I just looked for suspend in ahk documentation. You can use something like this to toggle suspend or has it to be the run dialog?
Code: Select all
^!s::Suspend ; STRG+ALT+S
-
- Posts: 44
- Joined: 15 Jul 2018, 16:29
Re: Can I suspend a script by running a specific command using Windows' Run command dialog box?
Is there any way I can convert the AHK file into an EXE, load it using the Run command dialog box, and then suspend it using the Run command dialog box?
Re: Can I suspend a script by running a specific command using Windows' Run command dialog box?
I was wrong. Parameters work without the .exe. But if you installed ahk from main site you get a compile(gui) option in your right click menu. Very handy.
Here's what you kinda need. But it won't use the current script it will close the old one and start again with suspend on if you add -s.
Here's what you kinda need. But it won't use the current script it will close the old one and start again with suspend on if you add -s.
Code: Select all
#SingleInstance, Force
If (A_Args.Length() > 0) {
; Erster Kommandozeilenparameter
Parameter1 := A_Args[1]
; Verarbeiten Sie den ersten Parameter
If (Parameter1 = "-s") {
Suspend on
}
}
-
- Posts: 44
- Joined: 15 Jul 2018, 16:29
Re: Can I suspend a script by running a specific command using Windows' Run command dialog box?
Thanks, but I'm confused. How can I execute this using Windows' Run command dialog box?