Title: Script for optional disconnect after Send & Receive All
I wrote the following very simple script because I normally want my Send & Receive All schedule to remain connected after it runs. But sometimes, I would prefer to have it disconnect. That way, I can kick it off and go eat lunch or something like that, which sound like a good idea right now!

Send & Receive with Optional Disconnect
by Allen Watson <[EMAIL PROTECTED]>
11/6/2000
Script for Microsoft Entourage
Set up required: You must have two Schedules defined in Microsoft Entourage. The first is the standard "Send & Receive All" with the dial-up option at the bottom set to "Stay connected"; the second you should create by duplicating the first and then changing the radio button setting at the bottom to "Close", so the schedule will always disconnect after running. If you have "Send & Receive All" running as a timed schedule, you will want to disable the timed option in one version so only one schedule runs.

This script simply prompts you to select "Stay Connected" or "Disconnect" as the action to take after picking up your mail, and then runs the selected schedule. Save the script in the Entourage Script Menu Items folder with "\moM" appended to the end. This will set the shortcut to Command-Option-M in Entourage. Use this instead of Cmd-M (which runs the Send & Receive All schedule). It will run this script, and let you select the disconnect action you want on the fly.

-------
set actionAfter to button returned of (display dialog "Choose desired action to follow mail pickup:" buttons {"Stay connected", "Disconnect"} default button 1)

tell application "Microsoft Entourage"
    if actionAfter is "Stay Connected" then
        execute schedule "Send & Receive All"
    else
        execute schedule "Send & Receive All & Disconnect"
    end if
end tell
-------

--
Peace be with you!
Allen <[EMAIL PROTECTED]> XNS Name: =Allen Watson
My web page: <http://home.earthlink.net/~allenwatson/>

Reply via email to