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...
AutoHotkey – Display an on-screen message
When I use AutoHotkey to run background tasks, download files and prepare backups, I want...
AutoHotkey – One-Click Auto Shutdown
Have you ever had to wait in front of your computer before it shuts down?...
Auto-Hotkeys for AutoHotkey
Are you manually doing these simple tasks over and over again? Starting webpages like “google.com”,...
Tags: AutoHotkey, AutoHotKey Scripts