You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Moving events from one iCal calendar to another

Can anyone shed some light on why the following does not work?

tell application "iCal"
set allEvents to events of calendar "Home"
set t to events of calendar "paul@myitcv.org.uk"
repeat with theEvent in allEvents
move theEvent to end of t
end repeat
end tell

I am trying to move all events from one calendar to another....

Any help much appreciated.

iCal 4.0.1, Mac OS X 10.6.2

Posted on Feb 28, 2010 12:27 PM

Reply
3 replies

Feb 28, 2010 1:28 PM in response to myitcv

Your list variable t is assigned the events of your second calendar, but you are just adding items to the end of that list. Try moving the items to the actual calendar instead:

<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #DAFFB6;
overflow: auto;"
title="this text can be pasted into the AppleScript Editor">
tell application "iCal"
repeat with anEvent in (get events of calendar "Home")
move anEvent to (end of events of calendar "paul@myitcv.org.uk")
end repeat
end tell
</pre>

Moving events from one iCal calendar to another

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.