Title: Re: Script: Toggle all schedules
On 3/19/03 8:52 PM, Allen Watson [EMAIL PROTECTED] wrote:

Wrote this for myself the other day, and I'm finding it useful. If you have several schedules, and ever want to quickly turn them all off (and back on later), this little script will do it:


property toggleoff : true
property activeScheds : {}
tell application "Microsoft Entourage"
    if toggleoff then
        set activeScheds to every schedule whose enabled is true
        repeat with aSched in activeScheds
            set enabled of aSched to false
        end repeat
        set toggleoff to false
        display dialog "Schedules DISABLED"
    else
        repeat with aSched in activeScheds
            set enabled of aSched to true
        end repeat
        set toggleoff to true
        display dialog "Schedules ENABLED"
    end if
end tell

As I have reported before, this only seems to work for me (changing a schedule’s enabled property via script), and in fact doesn’t. The schedule’s enabled checkmark changes but the schedules themselves continue to show the time and date for their next firing, and indeed do fire at those intervals even if the schedules appear (no checkmark) disabled. Manually clicking the enabled box, after running the script to disable, even when the schedule already “appears” disabled (checkmark absent in the checkbox) really does disable it, then running the script again “appears” to re-enable it but doesn’t because the next firing occurrence of recurring schedules do not appear in the column for that purpose. I did a rebuild to ensure I don’t have some lingering corruption (no joy, but no other symptoms of corruption either) but in fact I’ve noted this behavior through several iterations of Entourage, beginning at least in version 2001. If this seems to truly work for you (and not just appear to work) then I would like to know what is going on.  

Also, after running the script to disable my enabled schedules, the “else” logic never kicks in to re-enable the schedule because, although the checkbox to indicate the enabled status of the schedule is indeed empty, the AE to indicate such is not true (or whatever process is used by Applescript and E’rage to indicate status) because the script continues to present the “Schedules DISABLED” message through repeated runs, until I manually change the status of the schedules. Weird.

OSX 10.2.4, E’rage 10.1.1 (2418)

Jim

Reply via email to