iCal starting an AppleScript - which handler(s) are called?
iCal starting an AppleScript - which handler(s) are called?
- Subject: iCal starting an AppleScript - which handler(s) are called?
- From: Skeeve <email@hidden>
- Date: Thu, 15 Nov 2007 11:42:30 +0100
Hi!
I'm trying to write an applescript that should be started by iCal. Now
I'm asking myself which handler(s) are called to start the script. Is it
just the run-handler or are there others that might be called when present?
The problem I'm facing is that I need to get some information from the
event that's triggering my script. Currently I solve it with this code:
tell application "iCal"
-- find the event calendar. name is fixed!
set my_calendar to first calendar whose title is my_calendar_name
set this_event to (last event of my_calendar)
My script works fine, when iCal is running. But it can be started by
iCal Helper too, when iCal is not running at the moment the event starts.
The only purpose, that I "tell" iCal something is in order to get the
data I need. But maybe the run handler is only called because I don't
have another handler that might be called and which already gets all the
information I need?
Maybe something like "on alarm event_information"?
If not, can you please tell me how to launch iCal invisible so that,
when my script starts iCal, I don't see iCal's window(s). My attempt was:
tell application "iCal"
set visible of every window to false
end tell
This code is a workaround but it's a bit annoying when you're working on
the computer and suddenly iCal pops up and vanishes. More important: It
gets the focus which is even more annoying when the letters you type
don't end up in your current application.
Best regards,
-- Skeeve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden