Help with RunWait

Ask gaming related questions (AHK v1.1 and older)
Evil-e
Posts: 262
Joined: 04 Sep 2018, 11:09

Help with RunWait

18 Apr 2019, 05:53

Can someone help me with how RunWait is used in a script?

The inital reason I posed this question, was a problem in a script for DiRT: 3. That issue was completely resolved, via Gosub command
thanks to guidance from swagfag :)

However, the means by which I suspect RunWait works within a thread, intrigues me and would like to experiment with it and see its
posibilities. After lots of research, the seemingly best thread is written in Deutsch and google translate leaves a bit to be desired. It appears
that RunWait executes AFTER another program is closed. If this is the case, I have some ideas of how I could introduce this command within
some scripts I already have working.

:morebeard:
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask :)
Evil-e
Posts: 262
Joined: 04 Sep 2018, 11:09

Re: Help with RunWait

24 Apr 2019, 16:47

Come on, pepes. Somebody who has opened this thread has an answer or a link that would help :)

here, I will do a little dance for ya.... :dance:

maybe a some encouragement would do the trick.... :bravo:

how's about a nice little friendly wave.... :wave:

did you know the purpose of reindeer? It is to make the grass grow, sweetie..? :lol:

did you know the difference between a hippo and a zippo..? One is heavy, while the other is a little lighter :lol:

an elf, a man and a wizard walk into a bar... the hobbit laughs as he walks under it :lol:

would if I shaved my beard..? :beard:

naaaa.... that ain't gonna happen :morebeard:
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask :)
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Help with RunWait

25 Apr 2019, 11:51

It appears that RunWait executes AFTER another program is closed.
No, Runwait executes, but then waits... It just runs a program like Run does - but it waits until the program, that is has run, has finished/is closed. Not really another program... but exactly the program you specified.

Let's say you want to batch-process some pictures with Irfanview (or some other program) via command line. If your following code depends on the result of this processing, you should use Runwait instead of Run to run the program...

But sometimes there are things to consider, like in cases where there is a launcher-like program:
https://autohotkey.com/docs/commands/Run.htm#Remarks wrote:Unlike Run, RunWait will wait until Target is closed or exits, at which time ErrorLevel will be set to the program's exit code (as a signed 32-bit integer). Some programs will appear to return immediately even though they are still running; these programs spawn another process.
Evil-e
Posts: 262
Joined: 04 Sep 2018, 11:09

Re: Help with RunWait

25 Apr 2019, 14:15

Oh.... OK, thanks :)

Not what I was hoping it would be, but just adds one more really cool thing that AHK can do :bravo:
This is good information that I will bank for future use, so it WILL find a way into something I write in the future :thumbup:

Thinkin' 'bout changin' it up a bit....
Image

F that, :morebeard:
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask :)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: vysmaty and 122 guests