Are you prepared for Wrath of the Lich King? WoW Insider has you covered!

AppleScript: Print daily iCal agenda

If you use iCal to store you important dates and events, and use it on a regular basis without syncing events via an iPod, iPhone, or other device, then you know how frustrating it can be when you forget about an appointment or event. I'm going to show you a way to automatically print your daily iCal agenda with a simple AppleScript. You can set this script to run when your Mac starts up so you never miss an appointment!


Continue reading to learn how to create this AppleScript.

Creating the Script

Open Script Editor.app (it can be found in /Applications/AppleScript). When you have the application opened, type (or copy / paste) the entire AppleScript below.

tell application "iCal"
view calendar at (my (current date))
switch view to day view
activate
tell application "System Events"
keystroke "p" using command down
delay 1 -- (seconds)
keystroke return
delay 2 -- (seconds)
keystroke return
end tell
quit
end tell

When you are finished, your script should look similar to the one below.



Saving the script

You can save this script as an application by clicking File > Save As, and choosing "Application" from the "File Format" drop-down box. Type a name and location for your script to be saved and then click the "Save" button.



Running the script

To run this script, you can double-click on the application that you just created or you can drag it into the dock for easy clicking (or right-click on the icon in the dock and select "Open at Login" to have your script run when you login to your account).

When the script runs, it will open iCal, set the view to the current date, and will then print the current view. Normally, this would take a couple minutes to do by hand, but you can now have an iCal agenda quickly printed off.

Additional notes
  1. This script assumes that you are using either Mac OS X "Tiger" (version 10.4) or "Leopard" (version 10.5). I have yet to test this on 10.3 or below, but it may work on older versions of Mac OS X.
  2. In order to use this script, you must enable "GUI Scripting." To do this, open "AppleScript Utility" in the /Applications/AppleScript directory. Then check the "Enable GUI Scripting" checkbox.

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 (1295)
Apple (1612)
Apple Corporate (547)
Apple Financial (186)
Apple History (39)
Apple Professional (49)
Apple TV (160)
Audio (441)
Bad Apple (119)
Beta Beat (149)
Blogging (87)
Bluetooth (15)
Bugs/Recalls (56)
Cult of Mac (870)
Deals (201)
Desktops (115)
Developer (206)
Education (93)
eMac (10)
Enterprise (127)
Features (375)
Freeware (363)
Gaming (344)
Graphic Design (18)
Hardware (1272)
Holidays (41)
Humor (590)
iBook (65)
iLife (237)
iMac (183)
Internet (306)
Internet Tools (1289)
iPhone (1356)
iPod Family (2021)
iTS (962)
iTunes (795)
iWork (18)
Leopard (356)
Mac mini (109)
Mac Pro (50)
MacBook (197)
MacBook Air (77)
Macbook Pro (215)
Multimedia (434)
Odds and ends (1420)
Open Source (272)
OS (891)
Peripherals (190)
Podcasting (181)
Podcasts (83)
Portables (197)
PowerBook (138)
PowerMac G5 (50)
Retail (573)
Retro Mac (47)
Rig of the Week (42)
Rumors (613)
Software (4223)
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 (910)
Weekend Review (74)
WIN Business (49)
Wireless (80)
XServe (35)
Mac Events
One More Thing (27)
Liveblog (0)
Other Events (231)
WWDC (182)
Mac Learning
Ask TUAW (96)
Blogs (85)
Books (23)
Books and Blogs (63)
Cool tools (444)
Hacks (463)
How-tos (480)
Interviews (33)
Mods (184)
Productivity (583)
Reviews (99)
Security (145)
Terminal Tips (56)
Tips and tricks (560)
Troubleshooting (161)
TUAW Features
iPhone 101 (23)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (141)
Flickr Find (33)
Found Footage (70)
Mac 101 (81)
TUAW Interview (31)
Widget Watch (196)
The Daily Best (2)
TUAW Faceoff (6)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

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

#BloggerPostsCmts
1Dave Caolo510
2Cory Bohon434
3Mat Lu374
4Erica Sadun351
5Scott McNulty352
6Michael Rose2718
7Brett Terpstra220
8Mike Schramm204
9Steven Sande169
10Robert Palmer1524
11Joshua Ellis74
12Christina Warren619
13Nik Fletcher41
14Chris Ullrich31
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: