Application Control
I love it when my applications obey my automation. Application scripting opens so many options.
Video Description
Some of the more useful actions in Keyboard Maestro involve application control. A lot of times you're going to want to use Keyboard Maestro to turn on applications, hide them, activate them and the likes. So to do that, we're going to click on New Action here in this Application Control sample script. And you can see I've already selected the Application Control Folder on the left side. This gives you a list of all of the available actions related to applications. The first two are activate the next or the last application. A lot of people will make simple scripts with these to go forward or backward among their applications. For instance, I'm going to make a trigger here with the hotkey and I'm going to make it my hyper key right arrow. And that will .... Actually, it should probably be left arrow because it's the last application. And now I've just made a simple script to go back to the last application. Let me set up something here.
All right, I just opened up Safari and got to the MacSparky website. And you can see I'm in Keyboard Maestro, and now I'm in Safari. The last application was Keyboard Maestro. So if I hold down the hyper key and the left arrow, it jumps back to Keyboard Maestro. You can do the same thing the opposite direction to make a hyper key, right arrow, go to the next application. So, you can scroll between your applications. That's just one thing you can do with these. The next thing you can do is activate a specific application. This one shows up a whole lot in section 6 because I have numerous setup scripts where I activate specific applications and put them in specific places on my screen. You can also bring a window to front. You can quit applications. And you can hide applications. Generally I hide applications, but any ... on occasion, I'll quit an application. For instance, in section 6, I have a screencast about how I have it quit my scanning software when I unplug my scanner from the USB port. You can have it Show Applications or All Applications or show specific ones and apply specific modifier.
So, as you can see, just about anything you can do with an application is an available action in Keyboard Maestro. If you're interested in this, I encourage you to watch the Window Management and Setup screencasts in section 6 where I use these extensively.
Downloadable Keyboard Maestro Script: