Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

elitesouth

macrumors member
Original poster
There's an application that I use that performs a command whenever I type CTRL+1 no matter which application I'm in.

When I'm away, I'd like to have OS X perform that key combo every 10 minutes. How is this accomplished?

Thanks in advance for your help.
 
Yeah that's what I've seen around the web (don't think I haven't googled it already), but I was looking for more of a direction in which to go on how to set up this Applescript, Automator, etc.
 
Probably learning about launchd would be worthwhile (start with man launchd.plist).

What is this periodic command then?
 
In addition, you might try the script below. Copy the code and paste it into your AppleScript Editor. Replace "app_name" with the name of the application you desire to be frontmost at runtime. From the Script Editor's File menu select Save As > File Format: application, and be sure to check "Stay Open" under Options.

The script:

on idle
tell application "app_name" to activate -- replace "app_name" with frontmost app
tell application "System Events"
key code 18 using control down
end tell
return 600 -- repeats in ten minutes
end idle


Launch the script prior to leaving your computer, as needed. To quit the script at any time while it's running, click on its docked icon and select Quit from the popup menu. Hope this helps.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.