Hi,
is it possible with a script to change in iCal the end time of an event, in this case adding 10 minutes?
Thanks
MacPauli
Model: Mac Mini Core Duo
AppleScript: 1.10.7
Browser: Mozilla/5.0 (000000000; 0; 00000 000 00 0; 00000) 000000000000000 0000000 0000 000000 000000000000
Operating System: Mac OS X (10.4)
Yes, end date is a property of an iCal event that can be both read and set. Given a date formatted variable addiing to it goes like this:
set Now to (current date)
set Later to Now + 10 * minutes
It is also possible to make an event recurrent so it will happen every ten minutes.
You’ll have to be more descriptive of your needs or supply a script fragment to be more specific.
Thanks for this script!
And how can i set this new end time in iCal.
Example: in iCal i have an event from 09:00 to 10:00. After using the script, it’s in iCal an event from 09:00 to 10:10.
Best regards
MacPauli
MacPauli:
The trick is selecting events in iCal to work with. I do not know if a script can be written to alter a selected event directly from the iCal window, but as long as there is a pattern to the events you want to change, this script will do the job for you:
tell application "iCal"
set chosen_Events to every event of calendar "CALENDARNAME" whose summary contains "Cub Scout"--This is where all the events to be changed are placed into a list
repeat with one_Event in chosen_Events
set one_Event's end date to ((one_Event's end date) + (10 * minutes))--This takes the event's end time and adds 10 minutes to it.
end repeat
end tell
Hi,
thank you. That’s the solution!!
MacPauli