• 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
Rép: Calendar event creation and UID parsing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép: Calendar event creation and UID parsing


  • Subject: Rép: Calendar event creation and UID parsing
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 21 Sep 2015 22:47:53 +0200

Le 2015/09/21 à 22:19, Jay Louvion <email@hidden> a écrit :


Hi all,

I’m finally getting down to finding some new solutions to the scripting environment imposed as from Mavericks and Yosemite in regard to Calendar scripting - your recent feedback (dressing the process by ID to assure cross-OS compatibility) was promising but didn’t live up to my expectations.

I do notice one thing to start off this: creating an event takes up to 39 seconds (Whaaa?).
Is this a behaviour you also notice? Please note that our calendars are synced over iCloud - which might be part of the answer.

Secondly, because the search for a particular term is sooooooo lame (I used to search a number generated from our Filemaker solution previously), I have decided to go for a more integrated approach using the Calendar app’s UIDs.
For this to work, I will need to to parse the result, which returns as such: 

event id "0105626A-2B1A-4738-A2D6-0F0CDF6619B8" of calendar id "8AAA0533-87C5-4E5E-A087-ABA983BEDB47”.

Impossible for the moment to find a way of parsing the result back into text to throw it back into Filemaker for future use. Any ideas? 

Many thanks in advance for your input. And quite nice to be back in the game and reading you again.

J.

Hello Jay

Here is my well known quick and dirty tip.

tell application "Calendar"
set anEvent to first event of (get calendar 2)
try
anEvent * 2 # will always issue an error
on error errMsg number errNbr
log errMsg (*Impossible de convertir «class wrev» id "2497f734-dad7-370f-8899-4a1fc0eb49ee" of «class wres» id "B14C3AF8-9317-4B34-A7D6-2CDAE576D03E" of application "Calendar" en type number.*)
set maybe to my decoupe(errMsg, quote)
set eventID to item 2 of maybe
log result (*2497f734-dad7-370f-8899-4a1fc0eb49ee*)
set calendarID to item 4 of maybe
log result (*B14C3AF8-9317-4B34-A7D6-2CDAE576D03E*)
end try
end tell

#=====

on decoupe(t, d)
local oTIDs, l
set {oTIDs, AppleScript's text item delimiters} to {AppleScript's text item delimiters, d}
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe

#=====

Yvan KOENIG (VALLAURIS, France) lundi 21 septembre 2015 22:35:45




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Calendar event creation and UID parsing
  • Next by Date: Re: how do you automate syncing?
  • Previous by thread: Calendar event creation and UID parsing
  • Next by thread: AppleScript support for Swift
  • Index(es):
    • Date
    • Thread