• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iCal Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iCal Script


  • Subject: Re: iCal Script
  • From: John M <email@hidden>
  • Date: Sat, 23 Sep 2006 13:38:47 +0100


Date: Wed, 20 Sep 2006 21:10:47 -0600
From: "Jesse Almanrode - JA Computing" <email@hidden>
Subject: iCal Script

Does anyone out there have a script that will automatically export a
specified calendar to the .ics file?  I am looking to do this so that
I can automate an FTP upload to my webserver.

-- Jesse Almanrode

Hi Jesse

This script copies all the .ics files in your Application Support/ iCal folder:

--
set theDestination to choose folder with prompt "Where do you want the files?"
set myPath to alias ((path to application support from user domain) & "iCal:Sources:" as string)
tell application "Finder"
activate
set myFolders to (folders of folder myPath)
set doneList to ""
repeat with myFolder in myFolders
set thePath to ((myFolder as alias) & "info.plist") as text
set theXML to read file thePath
repeat with myPara from 1 to count of paragraphs of theXML
if paragraph myPara of theXML contains "Title" then set theName to (characters 10 thru -10 of (paragraph (myPara + 1) of theXML) & ".ics") as string
end repeat
set name of file "corestorage.ics" of myFolder to theName
delay 0.25
try
duplicate file theName of myFolder to theDestination with replacing
set doneList to doneList & return & theName
on error theErr
display alert "File '" & theName & "' could not be copied." message theErr giving up after 30
end try
set name of file theName of myFolder to "corestorage.ics"
end repeat
display alert "iCal .ics file copy done." message "The following files were created in the folder:" & return & "'" & theDestination & "'" & return & doneList giving up after 30
end tell
--


Best wishes

John Maisey



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: iCal Script
  • Next by Date: Re: AppleScript runs slow on Intel Mac's
  • Previous by thread: Re: iCal Script
  • Next by thread: Curl lock up
  • Index(es):
    • Date
    • Thread