Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
AOL 5.0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AOL 5.0



Hi all, I'm trying to write an AppleScript that will:

1. Launch AOL 5.0
2. Create new message
3. Paste message recipient from TEXT file
4. Paste subject from TEXT file
5. Paste body from TEXT file

#1-3 are working but it gets hung up when trying to paste in the subject and
body. In AOL 4.0 the script below worked perfectly, however I think the
Variables(??) for "subject" and "Body" have changed in AOL 5.0.

Can anyone shed some light.

Thanks!




on sendEMail(theRecipient, theSubject, theBody)
if theRecipient ? "" then
tell application "Finder"
if exists (process 1 whose creator type is "AOp3")
then
-- AOL sometimes sets the window bounds to
something off-screen if AOL is hidden, so make sure AOL is not hidden
set appName to name of application file id
"AOp3"
set visible of application process appName
to true
else
open application file id "AOp3"
end if
set theApp to (process 1 whose creator type is
"AOp3") as +class psn ;
end tell

try
tell application "America Online" to tell theApp
set newMsg to make new document with
properties {kind:mail}
set newMailer to mailer of newMsg
make new addressee at end of newMailer with
properties {kind:regular, name:theRecipient}
set subject of newMailer to theSubject
set text of newMsg to theBody
end tell
on error theErrorMessage
beep
activate
display dialog "America Online couldn't create a
message because: " & theErrorMessage buttons {"OK"} default button "OK" with
icon caution
end try
end if
end sendEMail




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.