The NEW Build Your Own Arcade Controls
Main => Software Forum => Topic started by: Connorsdad on August 07, 2013, 05:06:19 pm
-
I have 8 Ahk.exes loading at startup of windows, each one has a custom loop consisting of:
Loop
{
Process, Wait, process.exe
run blah blah
Process,WaitClose, process.exe
run blah blah
}
So Ahk_process1.exe would have:
Loop
{
Process, Wait, process1.exe
run blah blah
Process,WaitClose, process1.exe
run blah blah
}
Ahk_process2.exe would have:
Loop
{
Process, Wait, process2.exe
run blah blah
Process,WaitClose, process2.exe
run blah blah
}
etc etc etc
How do I combine these into one ahk?
-
You can combine them, but autohotkey does not support multi-threading. It runs code one line at at time.
-
Only one of the processes will be active at any one time therefore only one loop will be active at any one time. How do I have all the loops in one ahk script?
Sent from Amstrad CPC464
-
Sussed it :)
Edit:
No I haven't :(
Sent from Amstrad CPC464
-
Only one of the processes will be active at any one time...
If that's the case, I'm thinking something like this could work:
Loop
{
Process, Wait, process1.exe, 0.1
If (ErrorLevel != 0)
{
run blah blah
Process,WaitClose, process1.exe
run blah blah
}
Process, Wait, process2.exe, 0.1
If (ErrorLevel != 0)
{
run blah blah
Process,WaitClose, process2.exe
run blah blah
}
Process, Wait, process3.exe, 0.1
If (ErrorLevel != 0)
{
run blah blah
Process,WaitClose, process3.exe
run blah blah
}
}
-
Thank you nitz, absolute star :)
Much tidier now.
-
:applaud:
Glad it worked for you.
:cheers: