Connection Script
Index
START OF SCRIPT.
-- -- This script is used to connect to the Internet using PPP -- uses MacPPP Control, Applescript addition, by Mark Alldritt -- try activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate -- -- Establish a PPP connection -- openPPP -- -- Waste some time while the connection is established. -- This is needed because MacPPP -- operates asynchronously. -- set i to 1 repeat while (i < 500 and not (PPPopened)) -- may need to increase (was 100) on fast Macs set i to i + 1 end repeat if not (PPPopened) then error "MacPPP connection not opened" end if -- -- activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate -- -- Get Eudora started -- tell application "Finder" activate select file "Eudora Pro 3.0" of folder "Eudora Pro Folder" of startup disk open selection end tell -- -- activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate -- -- start Lollipop with activate the group file -- tell application "Finder" activate select file "Lollipop Groups" of folder "Lollipop" of disk "D650C" open selection end tell -- -- activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate -- tell application "Mail Server" activate Call "spiderisland" end tell -- -- activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate -- -- Send queued messages and check for new mail -- with timeout of 300 seconds -- give Eudora 5 minutes to do it's thing tell application "Eudora Pro 3.0" connect with sending and checking end tell end timeout -- -- activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate tell application "Eudora Pro 3.0" to quit activate -- several activates are used to ensure the script is the foreground activate -- process to avoid problems with closePPP when its called from the activate -- background. activate -- -- on error errorString -- -- Something went wrong. Let the user know, and offer to close the connection -- activate if PPPopened then -- display dialog "Can't check the mail (" & errorString & "). --Close MacPPP connection?" buttons {"Close", "Don't Close"} default button "Close" with icon caution -- if button returned of the result = "Close" then closePPP -- end if -- else -- display dialog "Can't check the mail (" & errorString & ¬ -- ")." buttons "OK" default button "OK" with icon caution end if end try -- -- -- on idle return 30 -- idle time in seconds end idle -- -- --END OF SCRIPT.
IndexJuly 16, 1997