Joystiq has your stash of criminally complete GTA IV news!

Mac 101: schedule your scripts

We talk about iCal once in a while. Did you know that an iCal alarm can launch an AppleScript? A recent comment from reader Zach (and subsequent replies) made us think that this tip might be of use to anyone who hasn't considered the possibilities.

When you schedule an alarm in iCal, one of the options for the alarm is "Run script." If you select "Other..." from the script selection dropdown, you can choose any AppleScript you want to launch. Then you just tell the alarm when to go off and your script will run.

Considering that AppleScript can control quite a few of the applications on your mac, and that iCal can handle repeating events, the possibilities are wide open. You could do something as simple as schedule applications by putting the following into a script in Script Editor and saving it as a regular script:

tell application "Safari" to activate

and another one...

tell application "Safari" to quit

to quit. Of course, you could then add to the scripts to have Safari navigate to certain pages as well. And you could launch as many apps as you want in the same script. Anything you can do with AppleScript, you can schedule. For more Terminal-savvy readers, Applescript's "do shell script" command allows for an even wider range of possibilities. You can even get user interaction with a "display dialog" command. I'm sure there's someone here who could have a blast with this.

Related Headlines

Reader Comments (Page 1 of 1)

Add your comments

Please keep your comments relevant to this blog entry. Email addresses are never displayed, but they are required to confirm your comments.

When you enter your name and email address, you'll be sent a link to confirm your comment, and a password. To leave another comment, just use that password.

To create a live link, simply type the URL (including http://) or email address and we will make it a live link for you. You can put up to 3 URLs in your comments. Line breaks and paragraphs are automatically converted — no need to use <p> or <br> tags.

New Users

Current Users

TUAW Features

Mac 101 iPhone Around the Worldask-tuaw
Mac News
Macworld (497)
.Mac (38)
Accessories (624)
Airport (75)
Analysis / Opinion (1292)
Apple (1610)
Apple Corporate (547)
Apple Financial (186)
Apple History (38)
Apple Professional (49)
Apple TV (160)
Audio (441)
Bad Apple (119)
Beta Beat (148)
Blogging (87)
Bluetooth (15)
Bugs/Recalls (56)
Cult of Mac (870)
Deals (200)
Desktops (114)
Developer (205)
Education (93)
eMac (10)
Enterprise (126)
Features (373)
Freeware (363)
Gaming (344)
Graphic Design (18)
Hardware (1270)
Holidays (41)
Humor (587)
iBook (65)
iLife (237)
iMac (183)
Internet (306)
Internet Tools (1289)
iPhone (1350)
iPod Family (2020)
iTS (962)
iTunes (794)
iWork (18)
Leopard (355)
Mac mini (109)
Mac Pro (50)
MacBook (197)
MacBook Air (77)
Macbook Pro (215)
Multimedia (433)
Odds and ends (1417)
Open Source (271)
OS (890)
Peripherals (190)
Podcasting (181)
Podcasts (83)
Portables (197)
PowerBook (138)
PowerMac G5 (50)
Retail (572)
Retro Mac (47)
Rig of the Week (42)
Rumors (612)
Software (4220)
Software Update (395)
Steve Jobs (252)
Stocking Stuffers (55)
Surveys and Polls (97)
Switchers (111)
The Woz (34)
TUAW Business (227)
Universal Binary (281)
UNIX / BSD (62)
Video (909)
Weekend Review (74)
WIN Business (49)
Wireless (80)
XServe (35)
Mac Events
One More Thing (27)
Liveblog (0)
Other Events (231)
WWDC (181)
Mac Learning
Ask TUAW (96)
Blogs (85)
Books (23)
Books and Blogs (63)
Cool tools (444)
Hacks (462)
How-tos (480)
Interviews (33)
Mods (184)
Productivity (583)
Reviews (99)
Security (145)
Terminal Tips (56)
Tips and tricks (559)
Troubleshooting (161)
TUAW Features
iPhone 101 (23)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (141)
Flickr Find (32)
Found Footage (70)
Mac 101 (81)
TUAW Interview (30)
Widget Watch (196)
The Daily Best (2)
TUAW Faceoff (5)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

The Unofficial Apple Weblog (TUAW) bloggers (30 days)

#BloggerPostsCmts
1Dave Caolo490
2Cory Bohon455
3Mat Lu374
4Erica Sadun351
5Scott McNulty341
6Michael Rose2919
7Brett Terpstra240
8Mike Schramm194
9Robert Palmer1323
10Steven Sande139
11Christina Warren618
12Joshua Ellis64
13Nik Fletcher41
14Chris Ullrich21
15Jason Clarke11
16Lisa Hoover11
17Victor Agreda, Jr.14

Featured Galleries

Macworld 2008 Keynote
Macworld 2008 Build-up
Macworld Expo 2007 show floor
The Macworld Faithful in Line
iPhone First Look
iPhone 2.0 - .Mac push e-mail
iMac 1998
TUAW Faceoff: Screenshot apps on the firing line
Boston Apple Store (Boylston Street)

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

    Weblogs, Inc. Network

    Other Weblogs Inc. Network blogs you might be interested in: