Export iCal calendars with AppleScript

How might I do this? Since the iCal ics files aren't in a neat and tidy place anymore, now I have to export. Can anybody help?
Thanks so much!
-Ben

It's pretty easy as you can just access fields from the iCal database.
If you play with the following, you'll see what I mean. It allows you to pull the data from a given calendar. You can then repurpose that data.
set returned_events to {}
set event_list to {}
tell application "iCal"
    activate
    set the returned_events to every event of calendar 1
    repeat with x from 1 to (count of items in returned_events)
        set the_event to item x of returned_events
        set the_summary to summary of the_event as text
        set the_description to description of the_event as text
        set the_date to the start date of the_event as text
        set holder_list to {}
        set holder_list to {the_date & tab, the_summary & tab, the_description & return}
        copy holder_list to end of event_list
    end repeat
    set the clipboard to event_list as text
end tell
PowerBook G4   Mac OS X (10.2.x)  

Similar Messages

  • Deleting and Publishing ical Calendar with AppleScript

    I have a question I hope somebody can help me with.
    Thanks to a previous manager, we're stuck with Microsoft Project for our product release scheduled management. It has no capability for exporting the information into an iCal format for publication on our web dav server (so that sales reps, programmers, and techs can view it). I've made a BBEdit script that can take a tab delimited export of the crucial information from Project and make it into an importable iCal file.
    I'd like to find a way to delete the old iCal calendar, import the replacement and publish it using the same script. Unfortunately my Applescript skills are minimal; the BBEdit recorder has made it so easy to do most of what I need that I haven't had to learn all the rules for making a script.
    If anyone knows if this can be done, and how, and could help, I'd really appreciate it.

    Alf,
    I don't see a list of available calendars, so I think one needs the name of the calendar to access it. Is this correct?
    You are partially correct, the only protection that you have in this case is the fact that anyone who wishes to access a specific published calendar has to either know or guess the username/calendar_name combination.
    According to Apple: If your iCal calendars contain private or confidential information, you should not publish them on .Mac. Anyone who knows your calendar's URL can subscribe to it using iCal or view it using a web browser.
    In order to prevent unauthorized access Publishing a password-protected iCal calendar to iDisk, offers a viable secure alternative.
    ;~)

  • Create iCal-iCloud calendar with applescript

    I am trying trying to create a new calendar with Applescript in my iCloud account.  I've tried using the following:
    tell application "iCal"
      make new calendar with properties {title:item i of NewCalendars}
                        end tell
    but it creates it On My Mac.  I've tried searching for a way to do this but can't find anything.

    That seems to be possible with GUI Scripting:
    set theTitle to "New calendar"
    tell application "Calendar" to activate
    tell application "System Events" to tell process "Calendar"
        tell menu bar item "File" of menu bar 1
            click menu item "iCloud" of menu 1 of menu item "New Calendar " of menu 1
            -- (don't remove the space at the end of "New Calendar ")
        end tell
        keystroke theTitle & return
    end tell
    Before running the script, don't forget to enable access for assistive devices in the Accessibility System Preference pane.

  • Sharing Ical calendars with another PC outlook user?

    Can I share iCal calendar with PC Outlook users? Our platform is Exchange server.
    Thanks

    I too have a number of similar issues. How can I add live calendar data to my web site as only the url link option is there at present. Really need the capacity to share, view and even edit on PC otherwise google wins again with all these options existing.

  • How can I restore my ical calendars with TM

    Hello everybody,
    how can I restore my ical calendars with TM.
    Where are the calender files ical uses.
    Thanks for answering
    Bernhard

    They are in yourusername/Library/Calendars/. Each one is named with its unique ID, so you'll have to go into each one and Quicklook the Info.plist file. Towards the end of the file it will have a Key of Title and the name of the calendar. If you want to restore the whole calendar, restore the individual calendar folder. You can also restore individual events by digging into the Calendar (again, use Quicklook to view). Quicklook can be used while in Time Machine.
    Or, you can restore all calendars by restoring the Calendars folder.

  • Create iCloud calendar with Applescript

    I use the create calendar with name "" and it makes it "On My Mac". Is there any way to make it in iCloud instead?
    Thanks

    I'm having the same exact problem.
    However, it seems to only be a problem if iCal ISN'T OPEN when the AppleScript is triggered. If iCal is ALREADY OPEN before the AppleScript is triggered, then the problem doesn't exist.
    I'm not an expert at AppleScript, so I can't figure out how to ensure that iCal is running before the AppleScript is executed. Below is the contents of my AppleScript, and it always creates the event "On My Mac" instead of on iCloud if iCal isn't already running. 
    Any ideas on how to modify this AppleScript so that it ensures that iCal is running before the script executes?
    -- declare variables
    set theCalendarTitle to "Personal"
    set theSummary to "Title of Appointment"
    set theStartDate to "5/16/2012"
    set theStartTime to "12:00 PM"
    set theEndDate to "5/16/2012"
    set theEndTime to "5:00 PM"
    --convert the date and time variables to text strings
    set theStartDateAsText to theStartDate & " " & theStartTime as text
    set theEndDateAsText to theEndDate & " " & theEndTime as text
    -- convert text to dates
    set theStartDate to date theStartDateAsText
    set theEndDate to date theEndDateAsText
    tell application "iCal"
      activate
      --check for the existence of the calendar,  if the calendar doesn't exist, make a new one
              set allCalendarTitles to the title of every calendar
              if allCalendarTitles contains theCalendarTitle then
                        set theCalendarNumber to (first calendar whose title is theCalendarTitle)
              else
                        set theCalendarNumber to (make calendar at end of calendars with properties {title:theCalendarTitle})
              end if
      --make the event
              set theEvent to make event at end of events of theCalendarNumber
              tell theEvent
                        set start date to theStartDate
                        set end date to theEndDate
                        set summary to theSummary
              end tell
      show theEvent
    end tell

  • Sharing an iCal Calendar with friend's Google Calendar

    I have an iCal calendar that I would like to share with my girlfriend who uses Google Calendar and Android :-(
    How do I do this ? It looks really complicated.
    (I have OS.10.9 on my desktop).
    Thanks for your help.
    Puzzled78

    No, unfortunately it does not work this way. The easiest way would be (because she has an Android device and could not access iCloud calendar), if you would also set up a Google account on your devices (iOS and Mac) and then share a calendar via Google. Please see also: http://www.google.com/sync/index.html

  • Printing iCal calendars with a gutter

    Is this possible? Am I dense? All I want to do is print my weekly view calendar with a gutter for 3 hole punching. The default printing prints all the way to the very edge of the sheet with no apparent way to edit it. Looks really gross printed that way.
    Any ideas or work-arounds?

    This can't be created in iCal, but it CAN be created it in another program and then used in iCal.
    Here's how
    1) Quit iCal.
    2) In Safari (or Pages, or some other Apple app) choose File:Print:Paper Size.
    3) Go to Manage Custom Sizes
    4) Click on the Plus symbol to create a custom size. It should default to 8.5 x 11
    5) Give this a name by double clicking on "Untitled" (eg "Calendar")
    6) Set the left margin to .5 or 1.0 or 1.25 (or whatever you want).
    7) Click OK
    8) Open iCal
    9) Select File:Print
    10 Under "Paper;" select "Calendar", or whatever you named your new paper size
    11) Carry on
    Hope this helps.
    /rb

  • Export PDF Workflow with Applescript and CS3

    Hello,
    I am setting up some PDF workflow with Applescript.
    On a given moment, as my script runs and after getting some user-input answers to questions in some dialogs, my script tells InDesign CS3 to open the Export Adobe PDF window for the current document. I copied and pasted that small part of the script:
    tell application "Adobe InDesign CS3"
    tell document 1
    export format PDF type to "Macintosh_HD:Test01.pdf" using "somePreset" with showing options
    end tell
    end tell
    When you run this small part of my Applescript, InDesign opens the Export Adobe PDF window (as expected) waiting for me to click on "Export". That is exactly what I want, since the user is given here a last opportunity to change some values (for example page range, or spreads). When all is set, the user can click on Export to close the dialog and finish the script.
    Problem: I was hoping that the Adobe PDF Preset "somePreset" would be selected in the first pull-down menu of the Export Adobe PDF window when this window is opened by the script. Unfortunately the last used preset is always selected by default. Anyone suggestions or help?
    Kind regards,
    Bertus Bolknak.

    My operators enter the page range and filename into a dialog box. Then I set those in the script. I use the Press Quality preset to start with and then set the changes I want into a export variable. I set things like bleed, marks, page range, etc.
    Here is an example:
    set theProps to properties of PDF export preset "[Press Quality]"
    try
    delete PDF export preset "Schmidt PDF"
    end try
    set theStyle to {name:"Schmidt PDF", acrobat compatibility:acrobat 7, bleed top:"0.125i", bleed bottom:"0.125i", bleed inside:"0.125i", bleed outside:"0.125i", page marks offset:"0.125i", include ICC profiles:Include None, effective PDF destination profile:use no profile, effective PDF X profile:"No Color Conversion"} & theProps
    make PDF export preset with properties theStyle
    set properties of PDF export preferences to theStyle
    set color bitmap sampling of PDF export preferences to none
    set grayscale bitmap sampling of PDF export preferences to none
    set page range of PDF export preferences to (item i of myPageList) as string
    export document 1 format PDF type to (PrinergyFolder & myJobNumFinal & "_" & VerCode & ".pdf") as Unicode text without showing options
    I am also doing this in Quark.

  • Share ical calendar with outlook PC

    hi - i'm wondering if i can share an iCal or iCloud calendar with someone who is on a PC and uses Outlook? thanks!

    Hello brianfrommissoula,
    Indeed, anyone using Outlook on Windows should be able to take advantage of the functionality provided by shared calendars.
    Public calendars can be shared with anyone. To access public calendars, visitors need to use Calendar (or iCal with OS X v10.7.5) on a Mac, Microsoft Outlook on a Windows computer, or any other app that supports the iCalendar file format.
    Private calendars can be shared with other iCloud users. Participants can view the calendar using iCloud Calendar, Calendar (or iCal with OS X v10.7.5) on a Mac, Microsoft Outlook on a Windows computer, or the Calendar app on iPhone, iPad, or iPod touch.
    iCloud: Calendar sharing overview
    http://support.apple.com/kb/PH2689
    Cheers,
    Allen

  • How do I sync MacBook Pro's old iCal calendar with iPhone 4?

    I had MobileMe, which as you all know, was not a perfect program. MobileMe left me with duplicates of every Calendar but I am not sure which one to delete of each pair for fear of losing date. But it did sync my iPhone and my iCal on my MacBookPro. So when it was suggested that I move to iCloud, I thought: Great idea. Maybe this program will work better!
    Well now I have no syncing between iCal calendar and iPhone iCal calendar.
    Does anyone know how to use this thing?
    AGH!
    Thanks for any help you can shoot my way. Assume idiocy: step 1, step 2, step 3 appreciated and for each device if you know how to fix this!

    Contacts and calender you can put on icloud then sync to your new phone when its setup to the icloud account. Not sure so with emails.

  • HT2513 Can I share an iCal calendar with someone who uses Google Calendar?

    That's basically the question.  I use iCal and I want to share one of my calendars with someone who uses Google Calendar and doesn't have any Apple products.  Is this possible?
    Thanks,
    Mark

    CD27 wrote:
    I didn't explain correctly. Right now I share (subscribe) a calendar on Mobile Me , in addition to my own personal calendar. That shared calendar is staying on Mobile Me and I need to be able to access it once I move my personal calendar to iCloud. That is, if I use iCloud can I share calendars that are not on iCloud, but are on MobileMe?
    You can't do this: when you migrate your MobileMe account to iCloud the calendars will be transferred there and no longer available on MobileMe.
    You can share calendars privately or publicly from iCloud: private calendars can only be viewed by nominated iCloud members; public calendars can be viewed by anybody in a CalDAV client such as iCal or Google Calendar (though they are non-editable).
    Please see this page:  http://support.apple.com/kb/PH2690

  • Publish multiple ical calendars with different colours for each calendar

    hi
    i am wanting to publish either multiple iCal calendars or a calendar group online so that the colours are preserved for different calendars. it would seem that the MobileMe published calendars still only support one colour (blue). could someone recommend another method of publishing read only iCal calendars online, preferably free, but i don't mind paying a small amount
    thanks
    nick

    Dear Ruben
    I would love to know how you can make some events Private.
    We use ical and sync to Google Calendar, but when I create events in iCal, there is no option to make it private.
    We have created a CalDAV connection to Google Apps Calendar, so any help about why there is no check box for Private would be appreciated.

  • I'd like to sync an iCal calendar with a Google calendar. Is this possible?

    Is it possible to sync from iCal to Google Cal? I know you can do it from Google Cal to iCal, but does it work the other way?
    Thanks,
    John

    Hi John,
    I use Spanning Sync to do this.
    Regards,
    Bud

  • ICal hangs when exporting a calendar

    When attempting to export a calendar (as a backup), it causes iCal to hang, and I have to Force Quit. The calendar is ~9.5 Megs in size. I have run Disk Utility.
    I am using iCal version 5.0.3.
    The last backup that was successful was on 9/21/2012 (I back up every week). Because I have added events and reminders since then, I don't want to restore that file but would like to see if there is a way ro "fix" the hangup so that I can get a good calendar export.
    Anybody have any suggestions?
    Thanks.

    through additional experimentation, here is what i learned.
    when i created the calendar, i told iphoto i wanted to display american holidays and a calendar from ical.
    If i unselect the show holidays options, my dates import correctly.  with holiday selected i get some dates from ical, but only to the extent they don't over lap with holidays.
    once i noticed this pattern, i went back and forth and sure enough if you have an event from ical on say chirtmas day, it won't be imported into your calendar.
    I didn't seem to matter which order the events were added to the calendar ... holidays first or ical calendar dates first.
    Finally, i created an ical calendar with the holidays i wanted displayed, then in iphoto told it not to include holidays, but to display both ical calendars.  That had the same issue.  on date where you have events on both calendars, only one set of dates will appear in iphoto.
    so to conclude building a calendar in iphoto you can not include dates from mulitple ical calendars without conflict.
    i stopped short of merging calendars in ical, but i guess that's next.
    Not to be too critical here, but that sounds like bug someone at apple might be able to fix.
    Perhaps some of the developers you have building weekly updates to itunes and put them to work cleaning up this kind of mess.
    Hope this helps others with the same problem.
    regards.

Maybe you are looking for

  • Saving multiple scanned pages as single document with 8620

    I need to scan multiple pages and save as a single document. I am scanning using the AiO remote app and my iPad Air. I see the "Add Pages" icon and use it, but when I save, it saves as individual documents. I need multiple pages to be a single docume

  • Problem in opening GET_TEXTID_TEXT in MAIN Main window

    Dear All, We want made some changes in smart form ZCRM_SLFN_ORDER_SERVICE_01. when we try to dobule click on GET_TEXTID_TEXT in MAIN windows, session is hanged for long time and I have end task. Thanks in advance, Nirav

  • Adobe AIR keeps trying to download a WIN32 module to my 64-bit OS

    Adobe AIR keeps trying to download a WIN32 module to my 64-bit OS. There's no s/w in the Adobe product list to read a FAQ or get help. 1) What is Adobe AIR? 2) Why do I need/want it? 3) Why is Adobe always trying to load it onto my system? 4) Why is

  • Oracle SQL Developper and SQL Server Connection

    Hello I try to connect to a SQL Server 2005 Database under Oracle SQl Developper but I always obtain this error : oracle.jdeveloper.cm.CMException: Unable to find driver: net.sourceforge.jtds.jdbc.Driver      at oracle.dbtools.raptor.conntypes.Raptor

  • How to make the custom field enable/disable in ME21n/ME22n/ME23n trans

    Hi Experts, I need help. I have created one custom field in the transaction ME21n/ME22n/ME23n under customer data 2 tab. But my problem is the field is always in enable (means editable only)  even in Display mode. How to make the field is non editabl