1
votes

I'm trying to get my AutoHotKey Script to only open the selected program once and I don't know how to get it to do that. When I run it, it just loops over and over. I can't even close the processes as fast as they open.

Here is my current script:

RunWait, launcher.exe, J:\Steam\SteamApps\common\Starbound\win32\ pause

What can I do to make the script only open the target exe once?

1

1 Answers

2
votes

I don't see a reason for that to happen. What program do you try to open?

What happens if you run an empty script with just that line in it?

Run, %A_WinDir%\system32\notepad.exe

You only need the second parameter (working directory), if your script is not in the same folder as the executable you are trying to run. But in this case you would need to pass the full path to the file (not only the file name) in the first parameter.

So it's either:

RunWait, J:\Steam\SteamApps\common\Starbound\win32\launcher.exe, J:\Steam\SteamApps\common\Starbound\win32\

or just

RunWait, launcher.exe

if you want to pass a command line parameter, you just attach it to the first parameter with a space.
Like this:

RunWait, J:\Steam\SteamApps\common\Starbound\win32\launcher.exe pause, J:\Steam\SteamApps\common\Starbound\win32\

Sometimes the parameters need a - or a / in front of them. so it might also be /pause or -pause...