How do I edit existing Calendar Events with Applescript?

I've got a script that needs to add a URL to an existing Calendar event.  I've tried everything I can think of but can't get it to work.  Here's what I've got so far, that's working, but it's missing the last piece:
tell application "Finder"
          set icsFile to POSIX path of ("Macintosh HD:Users:user:Library:Calendars:icsfile" as alias)
          set eventID to do shell script "cat " & quoted form of icsFile & " | grep -m 1 'UID:' | sed s/UID://"
          set hangoutLink to do shell script "cat " & quoted form of icsFile & " | grep 'X-GOOGLE' | sed s/X-GOOGLE-HANGOUT://" as URL
end tell
tell application "Calendar"
          get name of every calendar
          tell calendar "example calendar"
                    set theEvent to first event whose uid = eventID
  --here's the bit I can't get working
                    tell event theEvent
                              set properties to {url:hangoutLink}
                    end tell
          end tell
end tell
When I run it, I get the following error:
Calendar got an error: Can’t make event id "[email protected]" of calendar id "6B53911E-829F-4CCA-90F9-0A493B8DF3F5" into type integer.
Thanks in advance for any help!

The properties of the text should still be set to the text tool if it was the previous text used, otherwise I'm not to sure.

Similar Messages

  • How do I delete a calendar event in my iphone?

    How do I delete a calendar event in my iphone? It allows me to "edit" the event but not to totally delete it. Or at least I can't seem to find a "delete" option anywhere!

    Did you create the event somewhere else?  A lot of time when u create it on lets say PC or mac, you wont be able to edit it unless its from the same device. 
    Its also possible its created under a mail account.  I would suggest making all your events via icloud, then u should be able to edit it on all platforms regardless on which device made the event.

  • How do I enter a calendar event in my iPhone 4 iOS5 that repeats every third Thursday?

    How do I enter a calendar event in my iPhone 4 iOS5 that repeats every third Thursday?

    If you have Outlook 2007 on your computer you can set up the event to repeat every third Thursday on a calendar on your computer within Outlook. Then sync your iPhone with Outlook on your computer using iTunes.

  • How do I move google calendar events to iCal?

    how do I move google calendar events to iCal?

    ab1268,
    I'm trying to do this very thing.  I have multiple google calendars set up (one for each kid, my husband etc.).  I want to move to iCal exclusively.  Based on your note above, should I export each individual calendar within ical.  Remove each from the iCal account and then reimport then into ical?  I suppose the risk is low b/c the data still exists in google.
    Please advise - I would hate to misstep.  Very new to the apple world (aside from iphone / ipad).
    Thanks!

  • How can i import my calendar events from google calendar to ical?

    how can i import my calendar events from google calendar to ical?

    To set up CalDAV support for Google Calendar in Apple's iCal, follow these steps:
    Open Apple iCal, go to Preferences and then the Accounts tab.
    Click on the + button to add an account.
    In the box that pops up, enter a description for the account and your Google Account username and password.
    Under Server Options, add the following URL:
    https://www.google.com/calendar/dav/[email protected]/user//www.google.com/calendar/dav/[email protected]/user
    Replace '[email protected]' with the email address that you use to log in to Calendar. Make sure to include the '@domain.com' portion (which is @gmail.com for Gmail users) in this section.
    DO NOT substitute your username for 'user' at the end of the URL.
    Leave the Use Kerberos v5 for authentication option unchecked.
    Click Add.
    Under the Delegation tab, select the calendars you'd like to add to iCal by checking the boxes next to them. You may need to hit refresh to get the latest list of calendars.
    Add your email address to your Address Book card by selecting Add Email. You'll be prompted to add your email address only if your address is not already in your Address Book.
    You won't be able to invite or email guests to Google Calendar events within iCal if your address is not in your Address Book.
    Your Google Calendar will now appear in iCal's list of calendars, and changes you make to your Google Calendar in iCal will be reflected when you sign in to Google Calendar.
    Event information will automatically refresh every five minutes. You can change this interval by opening the iCal > Preferences > Accounts menu and selecting a new refresh interval under the 'Refresh calendars' drop-down. Keep in mind you can also force a refresh by selecting a calendar and pressing the Apple and R keys at the same time.
    Calendars that are checked but disabled have already been added to iCal - you can remove them from within iCal.

  • How do I set up calendar events that will be for another time zone? My events shift once I travel

    How do I set up calendar events that will be for another time zone? My events shift once I travel. The same is true when I am traveling and in another time zone, how do I best set up my events so they are in the correct time slot upon my return?

    Basically, if your client does not have a Mac then don't use iWeb to create the site. iWeb is Mac only and if a client wishes to make alterations, then they need the domain file.
    If your client needs to update on a weekly basis, then why not consider using one of the online website creation packages where you can log in from any Mac or PC. This would be simpler and there are lots out there - Microsoft Office Live or Google or something like http://www.wix.com where you can create a site and use a domain name with it.
    Look at the alternatives before using iWeb.

  • Delete calendar event with own notification text

    Hello Admin: I am new here and I don't know if this the correct community. Please feel free to move it in the correct coummnity
    Hello everyone.
    may you help me?
    I would like to delete a calendar event with my own notification text. Would it be possible, if I delete an calendar event that I could enter a comment before the declined message will be sent to the organizer?
    Kind regards
    Jane

    I have a similar issue.
    I am doing custom prints of each event in Calendar. I pull from each event the properties I want (time, location, summary, description) and format them nicely for an 8.5" x 11" print. I want to combine this newly created document with other files already attached to the event. However, I have not been able to figure out how to reference this property (or maybe it is considered an element?).
    When opening a single Calendar event with textEdit, you can see a line that starts with "ATTACH;FILENAME=", but referencing this line in applescript eludes me.
    How do we reference files that are attached to events in Calendar when using applescript?

  • How do we print a Calendar Event or Contact from I cloud?

    Help please!
    When we were using Outlook, it was easy to print our contacts and calendars.
    We have moved to I Cloud with our I Phones and am unable to figure out how to print a contact file or a calendar event with details.
    Suggestions???

    Please stick to your original post.
    Please have some patience.

  • I have downloaded IOS7 on my iPhone and all calendar events have disappeared. The general functions of the calendar have changed and are definitely not 'user friendly'. How can I retrieve my calendar events. Will Apple improve the calendar function

    I have downloaded IOS7 on my iPhone and all calendar events have disappeared. The general functions of the calendar have changed and are definitely not 'user friendly'. How can I retrieve my calendar events. Will Apple improve the calendar function or revert to the previous system. Even the typing function on IOS 7 is faulty - very slow to respond to the keyboard. I no longer enjoy using my iPhone. Can anyone assist. Thank you

    Very strange! All of my calendar events have reappeared. This has happened one week after downloading iOS 7
    The calendar however,  is not easy to use.
    The typing function on the phone has  become even slower. Have to wait for each letter to show on screen.

  • How do I retrieve lost calendar events after OS 5 synch?

    how do I retrieve lost calendar events after OS 5 synch?

    You can re-download them for free from:
    App Store>Purchased

  • How do I edit a PDF file with Adobe PDF Pack?

    How do I edit a PDF file with Adobe PDF Pack?

    Well, you don't. Editing a PDF is a difficult and fraught business even with the most expensive software.
    But PDF Pack lets you export to Word; then often you can edit in Word. Now you can make a new PDF. It might look like the original, or it might not. If small changes matter you might be out of luck. ON NO ACCOUNT USE THIS FOR GOVERNMENT FORMS.

  • Can i share a calendar event with another iphone?

    My husband and kids and I all have IPhone 4's.  Is there any way to "share" calendar events with each other as we do contacts??

    You need to create a calendar, that you share.
    After creating the calendar, click on the Calendar-Button in the upper right corner of the iCal Window, then select ,"Share" from the drop down menu.
    Choose "Share with only people you invite".
    Then add your event to this calendar.

  • HT4528 How do I recover my calendar events?  How about downloading audio books?

    Since the latest iOS 7 upgrade, I HATE my iPhone!  I was able to recover my contacts.  I was not able to recover my calendar events. 
    How do I recover my calendar events? 
      I have an appointment tomorrow & can't remember necessary info!
    How about downloading audio books?
    I am not able to download an audio book, which I have done for a very long time w/o issues. Have any suggestions?

    When I synced, & recovered the contacts, the calendar recovered events (as current) that I had deleted last winter.
    I check out audiobooks from the local library & download them using OneClickDigital Media Manager.  It goes thorugh iTunes to get the book onto my phone.  It shows up pale in iTunes (All other items are in bold print.) & the book does not show up on my phone at all. 

  • HT4993 How do I delete annual calendar events like birthdays?

    How do I delete annual calendar events, like birthdays?

    To delete birthdays, you have two options:
    1.  Delete the person's birthday from their contact entry.
    2.  In calendar, click "Calendars" in the upper left and uncheck the "Birthdays" calendar.

  • Can't edit existing calendar entries (synched with Google)

    I have 2 iPhones synched with one Google calendar.  Creating/Deleting new entries in any one place properly synchs to the other places. My problem is that when I edit an existing calendar entry from either iPhone and save it, the change is undone shortly afterwards and the entry returns to its previous status.  The change can be to any field (description, date, time, duration, etc).  This occurs on one-time entries as well as recurring calendar events.
    Any ideas on how to fix this?  TIA!

    Hi,
    From my experience, sometimes the issue may occur if offline address book cannot be updated.
    To manually force a download of the latest offline address book, please take the following steps:
    Delete the old offline Address Book which is located in the following Outlook folders:
    For Windows 7: \Users\<username>\AppData\Local\Microsoft\Outlook\Offline Address Books
    In Outlook client, click the Send/Receive tag on the top.
    Go to Send/Receive Groups->click Download Address Book.
    Since the issue only occur on Outlook, I recommend you to post this issue on Outlook Forum. Here is the link:
    http://social.technet.microsoft.com/Forums/en-us/home?forum=outlook&filter=alltypes&sort=lastpostdesc
    Thanks.

Maybe you are looking for

  • Footer and white space? Help?

    Hi there, I am fairly new to muse, but I have tried for so long to delete the white space at the bottom of my website. When designing, it shows about an inch of white space which I do not want at all. The image below shows this. I'd like the mustard

  • I have to attach a pdf which i get from spool and also attach some files

    hi , i have requirement where i have to send a pdf as attachment , this pdf is generated throught the spool request , along with this pdf i need to attach some files from the presentation server, i am using the fm SO_OBJECT_SEND, but the problem is i

  • ITunes not launching, if re-install will I lose playlists???

    I just downloaded the new version of iTunes off of Apple.com. Like most people I get the hourglass for a hot sec, then it disappears. QuickTime works fine. When I look in task mgr, I only see iTuneshelper. If I re-install iTunes will I lose all my so

  • Order Type wise GL Account While doing Good Issue.

    Dear All, Good Day, We have Different types of Plant Maintenance Order , now when we do Goods Issue against the order we need specific GL Account based on Order type. Example: Preventive Order should need XXXX GL Account                Corrective Ord

  • Page not found after login

    I'm evaluating Sun One Portal Server 6.1 after I login the desktop, I get - The page can not be found - message in my browser so I looked in the access_log - file of my web-server (IBMHTTPD) and saw that the Portal Server created a wrong URI /amserve