• 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: Scripting iCal. 10.4 and 10.5 UID's incompatible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?


  • Subject: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • From: Loren Ryter <email@hidden>
  • Date: Tue, 30 Oct 2007 08:07:49 -0400
  • Thread-topic: Scripting iCal. 10.4 and 10.5 UID's incompatible?

I'm having this issue too now.  Can you explain how to properly use the raw
codes?  I tried compiling this in Script Editor (Tiger):

tell application "iCal"
    repeat with thisCalendar in calendars
        repeat with thisEvent in (every event of thisCalendar)
            set u to (get «wr10» of thisEvent)
        end repeat
    end repeat
end tell

I get this error:  Expected expression but found ³«².

I also tried this with the same result:

Set u to «wr10» of thisEvent

(FYI those delimiter marks are typed with opt-\ and opt-shitft-\)



On 10/29/07 11:31 PM, "Paul Berkowitz" <email@hidden> wrote:

> Somebody with Leopard and either Script Debugger or Smile should be able to
> tell you what the raw code is for 'uid' - if that property of event still
> exists in Leopard. I suspect that it's «ID  » (that's two spaces as
> characters 3 and 4) and 'uid' is now a synonym for 'id' which compiles even
> in iCal tell block in Tiger since it's a property of 'window' in the
> Standard Suite. In Tiger the raw code for 'uid' is «wr10» .
>
> The thing to be careful of is that the Leopard 'id' might have a different
> structure from the Tiger 'uid'. Get the 'uid' and 'id' respectively in Tiger
> and Leopard of an event that was maintained/imported from Tiger into
> Leopard. Are they the same?
>
> Even if you don't care (i.e. the script is intended to operate either in one
> OS version or the other but not both at the same time nor on calendars moved
> to Leopard from Tiger and still checking IDs from Tiger), you'd just need
> then some code to check which version of iCal is running and then use the
> appropriate raw code for each branch «wr10» or «ID  » . Depending on which
> OS you're compiling in, one or the other (or maybe both in Tiger) will
> compile to 'uid' and 'id' respectively, but will operate appropriately on
> both OS's.
>
> To find the "main" version of iCal (corresponding to the OS):
>
> tell application "iCal"
>     character 1 of (get version) as integer
> end tell
>
>
> If the result is 2 you're in Tiger, if 3 (presumably) you're in Leopard.
> Deal accordingly.


 _______________________________________________
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

  • Follow-Ups:
    • Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Scripting iCal. 10.4 and 10.5 UID's incompatible? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • Next by Date: Where's the updated AppleScript Language Guide?
  • Previous by thread: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • Next by thread: Re: Scripting iCal. 10.4 and 10.5 UID's incompatible?
  • Index(es):
    • Date
    • Thread