Help speed up Applescript

Discussion created by KylePutzier on May 2, 2014
Latest reply on May 3, 2014 by sporobolus

I don't know enough about Applescript so I've made up a calculated applescript from examples I've found on the web.

It is very simple.

It hides the OS X window.

Deletes an event if it exist.

And then makes a new event.


It's pretty slow, about 1.5 seconds per event.

Is there a more efficient way to script it. I suspect it is the delete event that is the issue.




tell application "Calendar"


set visible of every window to false

delete (every event of calendar "Inventive Label" whose summary contains "1418")

make new event at end of events of calendar "Inventive Label" with properties {allday event:false, start date:date "5/1/2014 2:30 PM", end date:date "5/1/2014 5:30 PM", summary:"1418; 157419-1 Rev A", location:"Press 1", description:"Acme Corp."}

end tell