I want to Loop through a folder containing shortcuts (*.lnk files) and then run each program (shortcut).
After all the launched programs have been closed, the user running the script should be logged off.
I figured I'd use RunWait for this, but then each program will only run after the program from the previous loop iteration has exited (obviously).
Is there a way to have RunWait start multiple programs at once, or a more suitable alternative for what I'm trying to do?
Here's my code:
Code: Select all
Loop, C:\Path\to\Shortcuts\*.lnk {
RunWait, "%A_LoopFileLongPath%"
}
; logoff
Run, shutdown.exe /l /f, , Hide
; hotkeys
^!f::Send Foo
^!b::Send Bar