AutoHotKey Scripting Basics – The RunWait Command
The RunWait command is an extension of the Run command. However, as the name suggest, the RunWait command waits for the specified program to finish executing before continuing.
To simplify further, let’s consider once again the multi-line script example from the previous post:
#m:: Run Notepad Run www.yahoo.com Run Calculator Run www.google.com return
As I explained before, when you press the Win+m keys on your keyboard, the Run command will open these programs in a top-down sequential manner. But with the Run Command you can specify that the program on the next line opens only once the previous one has finished executing. As an example:
^n:: RunWait Notepad Run www.yahoo.com return
When you press Ctrl+N on your keyboard, the Notepad will open on your screen, and only after you close it will the Web site yahoo.com open up in your browser.
If you have to work repeatedly on certain applications in a specific order, you will find the RunWait command really useful. With just one little script, you will never need to bother opening these programs manually. I should warn you though, this gets addictive.
Meghna
Related posts:
AutoHotKey Scripting Basics: The Run Command
I have already used the Run command in two of my previous posts: Launching Google...
Auto-Hotkeys for AutoHotkey
People are frequently executing simple tasks without AutoHotkey because it is not practical to remember...
First AutoHotkey Script
With a little search, you’ll find a lot of script examples on the Internet but...
Tags: AutoHotkey, AutoHotKey Scripts