I sometimes want to create an event in iCal from a date that appears on a web page I'm viewing in Safari. Using Automator, I created a Service to do just that.
Here's how:
- Launch Automator
- Select Service from the Choose a Template for your Workflow sheet.
- Set the drop-downs at the top of the Untitled service to 'Service receives selected' [dates] 'in' [Safari].
- Drag a Run AppleScript action to the top of the Untitled service.
- Replace the template text in the Run AppleScript action with the following:
on run {input, parameters} set eventDate to date (input as text) tell application "Safari" set currentTab to current tab of first window set eventSummary to name of currentTab set eventUrl to URL of currentTab end tell tell application "iCal" activate tell calendar "Home" set newEvent to make new event at end of events with properties {summary:eventSummary, url:eventUrl, start date:eventDate, end date:eventDate + 30 * minutes} show newEvent end tell end tell end run - In the AppleScript text above, replace Home with the name of the iCal calendar that you want to receive the new events.
- Save the service as New iCal Event from Date (or whatever you wish to call it).

