Mailsmith
 Other Programs
 Scripts
  Mailsmith.scpt
  Archive to sub-mailbox
  Check Spelling
  Find reply
  Change font size
  Submit Script to JEM
  Fix common spelling errors
  Setting SMTP server
  URL from Safari
  Address from AB
  linkMunge
  Export to Address Book
  Saving attachments
  Digest Script
  File with same
  POP window position
  Position of new windows
  iCal and Mailsmith
  Edit From Line
  Modified Thread Script
  Reply to Selection
  Temporary Text Window
  Compact gain
  Tracking backups
  Edit subject
  Googler
  Auto-rewrap
  MMA
  SMTP server
  Open, fetch, and close
  URL Manager
  BrainForest
  Thread by Author
  Thread by subject
  Export Email
  Get Selection
  Read Addresses
  Export Email
  Organize Email
  Account setup
  Mailsmith 2 BBEdit
  BBEdit 2 Mailsmith
  Search II
  Check One
  Delete Enclosure
  Open, fetch, close
  Set Answered
  Set Redirected
  Empty Trash
  List found
  Print Several
  Del. old. msg.
  Delete Enclosures
 Accounts
 Address Book
 Editing
 Filters
 General
 Import/Export
 Links
 Mailboxes
 Memory
 Scripting
 Speed
 send/receive
 Tips/Tricks
|
Open, fetch, and close |
| Author |
Steve Bryant (parts of it comes from scripts by René Brouwer and John Carlsen)
|
| Last modified |
1998-02-03
|
|
What is this?
The script checks the mail then disconnects if Mailsmith made the
connection.
Comment from jem: As I understand it this script could give some problems on slower machines due to a tight loop, follow this link for a modified script by Gavan Schneider.
|
property NoError : 0
property PortBusy : -7114
property connectedState : {"connected"}
on run
try
set pppWasClosed to (state of (PPP status)) is not in connectedState
if pppWasClosed then
PPP connect
end if
with timeout of 999 seconds
tell application "Mailsmith 1.1"
activate
try
check mail
on error theErr
display dialog theErr
end try
repeat until not connection in progress
end repeat
end tell
end timeout
if pppWasClosed and (state of (PPP status)) is in connectedState then
PPP disconnect
end if
on error ErrMsg number errnum
if pppWasClosed and (state of (PPP status)) is in connectedState then
PPP disconnect
end if
end try
end run
|