• 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 scripting problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iCal scripting problem


  • Subject: Re: iCal scripting problem
  • From: Mr Tea <email@hidden>
  • Date: Sat, 02 Oct 2004 13:14:27 +0100

This from Christian Boyce - dated 2/10/04 3ยท08 am:

> If I have a script that involves iCal, AND I make an iCal event whose
> alarm triggers that script, AND if iCal is not running when the alarm
> time comes, the script runs twice.


Here's a workaround that could help you to avoid this issue...

set scrpt to alias "Studio!:Studio Files:Scripts X:New Scripts:iCal test"

tell application "Finder"
    if label index of scrpt is 0 then
        set label index of scrpt to 4
    else
        set label index of scrpt to 0
    end if
    set mrk to label index of scrpt
end tell

if mrk is 4 then
    tell application "iCal"
        activate
        display dialog "yo"
    end tell
end if

Bringing an external factor into play ensures that the iCal tell block only
runs once.


Nick
pp Mr Tea

--


 _______________________________________________
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

References: 
 >iCal scripting problem (From: Christian Boyce <email@hidden>)

  • Prev by Date: Fwd: iCal scripting problem
  • Next by Date: AppleScript Formatting - Strings
  • Previous by thread: iCal scripting problem
  • Next by thread: Fwd: iCal scripting problem
  • Index(es):
    • Date
    • Thread