Re: emailer script question....
Re: emailer script question....
- Subject: Re: emailer script question....
- From: Nigel Garvey <email@hidden>
- Date: Thu, 7 Dec 2000 00:07:20 +0000
"michael s. roels" wrote on Wed, 06 Dec 2000 12:59:51 -0600:
>
i have written a script for emailer to create a new mail message, address
>
it, paste the contents of the clipboard in the body of the message, and send
>
the message. everything works as planned as long as i do not try to paste
>
from the clipboard. i get an error that states "claris emailer got an error:
>
this command is not available while the application is in the background"
It's the same with any application. Only the frontmost application can
access the clipboard. You make an application frontmost by telling it to
activate, so replace:
>
tell application "Finder" to launch "claris emailer"
>
>
tell application "Claris Emailer"
with:
tell application "Claris Emailer"
activate
>
set bodyvar to clipboard --"test message"
>
set addrVar to "email@hidden"
>
set addrNameVar to "me"
>
>
set subjectvar to "re: "
>
>
make new outgoing message with properties ,
>
{subject:subjectvar, content:bodyvar, scheduled:true,
>
recipient:{{address:{address:addrVar, display name:addrNameVar}, recipient
>
type:to recipient}}}
>
connect to "America Online" with properties and sending
The things you can have with 'connect to' are checking, sending, and/or
TCP Control. You probably just need 'with sending' for this script.
>
end tell
NG