BusyCal URL Handler
BusyCal 2.0.5 adds support for URL handlers for creating new events and finding events in BusyCal. Through the use of BusyCal's URL handlers you can interact with BusyCal from AppleScript and other apps that can open URLs.
Creating Events in BusyCal
You can create a new Event in BusyCal using natural language by passing a percent escaped URL in the following format:
busycalevent://new/<event description>
The event description must contain an event title, date (today is assumed if no date), and a start time (an all-day event is assumed if no start time). In addition, you may include an optional calendar name preceded by a slash (e.g. /work), and an optional final parameter containing a URL surrounded by angle backets (e.g.
Here are some example natural language phrases for creating Events and the corresponding percent escaped URLs:
Baseball game tomorrow
busycalevent://new/Baseball%20game%20tomorrow
Staff meeting Thursday at 10am
busycalevent://new/Staff%20meeting%20Thursday%20at%2010am
Meeting with Joe June 7 at 3pm /Work
busycalevent://new/Meeting%20with%20Joe%20June%207%20at%203pm%20%2Fwork
Apple Earnings Conference Call Tuesday at 2pm <investor.apple.com>
busycalevent://new/Apple%20Earnings%20Conference%20Call%20Tuesday%20at%202pm%20%3Cinvestor.apple.com%3E
See Quick Entry for more info on the natural language syntax for creating Events in BusyCal.
Creating To Dos in BusyCal
You can create a new To Do in BusyCal using natural language by passing a percent escaped URL in the following format:
busycalevent://new/-<task description>
To create a To Do, precede the task description with a dash (-). You may provide a due date (an Undated To Dos is created if no date is provided), an optional priority via exclamation points (! = low, !! = medium, !!! = high), an optional calendar name preceded by a slash (e.g. /work), and an optional final parameter containing a URL surrounded by angle backets (e.g.
Here are some example natural language phrases for creating To Dos and the corresponding percent escaped URLs:
-Call Bob tomorrow
busycalevent://new/-Call%20Bob%20tomorrow
-Pay Taxes April 15!!! /Personal
busycalevent://new/-Pay%20Taxes%20April%2015!!!%20%2FPersonal
-Buy Toner /Shopping <www.amazon.com>
busycalevent://new/-Buy%20Toner%20%2FShopping%20%3Cwww.amazon.com%3E
See Quick Entry for more info on the natural language syntax for creating To Dos in BusyCal.
Creating events in BusyCal via AppleScript
Although BusyCal does not support AppleScript, you can use AppleScript (or other apps) to generate URLs that can be passed to BusyCal to create new Events or To Dos. Here is an AppleScript example.
This example shows how to create an event that includes a link to the current Safari web page:
tell application "Safari"
set theURL to URL of front document
set theName to name of front document
end tell
set myPrompt to display dialog "Create New Event in BusyCal" default answer theName
set response to the text returned of myPrompt
set encoded_response to encode(response & " <" & theURL & ">") -- see encode handler below
tell application "BusyCal"
activate
open location "busycalevent://new/" & encoded_response
end tell
--encode handler
on encode(msg)
set theText to do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of msg
set AppleScript's text item delimiters to "/"
set theTextItems to text items of theText
set AppleScript's text item delimiters to "%2F"
set theText to theTextItems as string
set AppleScript's text item delimiters to {""}
return theText
end encode
Following are sample scripts for creating events in BusyCal with links to Safari, Chrome, Mail, Evernote, and Contacts.
- Download the New BusyCal Event from Safari script
- Download the New BusyCal Event from Chrome script
- Download the New BusyCal Event from Mail script
- Download the New BusyCal Event from Evernote script
- Download the New BusyCal Event from Contacts script
For additional information on the BusyCal URL Handler, including AppleScript and XCode sample code, see BusyCal URL Handler.