• 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: How do you get iCal to run an Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you get iCal to run an Applescript


  • Subject: Re: How do you get iCal to run an Applescript
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 12 Jul 2005 09:43:37 -0700


On Jul 12, 2005, at 9:20 AM, Matt Neuburg wrote:

Make an "Open file" alarm that launches an applet.

Doesn't have to an applet; if it's a compiled script, iCal will run it. m.

I got it to run with "run script"; however, it doesn't do anything when run from iCal or when run from the script menu. It does work when running from Script Editor, though.


This is the script:

set foo to hours of (current date)
tell application "Mail"
    if (foo is greater than 23) or (foo is less than 7) then
        set fetch interval to 60
    else
        set fetch interval to 5
    end if
end tell

iCal was set to run it at 11 PM and 7 AM.

While I'm at it, the following script worked in Panther, but not in Tiger:

tell application "Mail"
    if (count of (messages of sent mailbox)) is greater than 0 then
        move messages of sent mailbox to the trash mailbox
    end if
end tell

It runs with no errors, but it doesn't do anything.  Here is the log:

tell application "Mail"
    count every message of sent mailbox
        19
    move every message of sent mailbox to trash mailbox
end tell

-- Michelle

--
Social Security Privatization: a solution in search of a problem.

_______________________________________________
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


  • Follow-Ups:
    • Re: How do you get iCal to run an Applescript
      • From: Brian <email@hidden>
    • Re: How do you get iCal to run an Applescript
      • From: Brian <email@hidden>
References: 
 >Re: How do you get iCal to run an Applescript (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Scripting cocoa classes
  • Next by Date: Re: How do you get iCal to run an Applescript
  • Previous by thread: Re: How do you get iCal to run an Applescript
  • Next by thread: Re: How do you get iCal to run an Applescript
  • Index(es):
    • Date
    • Thread