Re: automating e-mail replies
Re: automating e-mail replies
- Subject: Re: automating e-mail replies
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 26 May 2001 11:43:09 -0700
This is not the way to do it, Ekaterina. You are trying to use keypress
emulation methods, which are very unreliable, especially in a program like
Outlook Express which does not allow keys to be pressed and scripts to be
run at the same time, instead of using OE's very good AppleScript dictionary
to do things directly. The reason why Shane advised you to use a
_scriptable_ email program is so you can script it, not depend on Akua's
input state (which, insofar as it works, would also work with Netscape).
Within a
tell application "Outlook Express"
--
end tell
block, you can send all messages in the outbox by simply writing
send
You can receive messages from all your POP accounts by writing:
connect to every POP account
To wait until all messages have downloaded:
repeat while connection in progress
delay 1
end repeat
To mark all messages within your inbox as read, do
set read status of (every message in in box folder whose read status is
untouched) to read
But better than this in OE, since that might take a while if you have a big
Inbox, is to make a Rule in Tools--> Rules -->Mail (POP) which will
automatically check each message that meets your criteria (in this case <all
messages>) to <Run AppleScript> (since there's no action available to "Mark
As Read"). The script would say (within a tell OE block)
set theMsg to item 1 of (get current messages) -- the filtered message
set read status of theMsg to read
This would run every time your Send & Receive schedule runs.
There's no need to select all or anything like that. Do it behind the scenes
with AppleScript. If you're running this from the Rule, then you can move
and open each message like this:
move theMsg to folder "Special Folder"
open theMsg
-- more commands?
Or if you you were including this in a script that did the mail downloading,
I guess you could do it like this:
set newMsgs to (every message in in box folder whose read status is
untouched)
repeat with i from 1 to (count newMsgs)
set theMsg to item i of newMsgs
set read status of theMsg to read
move theMsg to folder "Special Folder"
open theMsg
-- more commands?
end repeat
I have no idea what this is supposed to mean:
>
uith other distruktive synthesis
>
program
>
>
save each new and re-deliver to original sender
If you want to write an auto-reply to each incoming message, that can also
be done by a Rule instead of a script, or it can be scripted behind the
scenes without opening up the messages. Can you let us know what the next
steps are?
In any case, I think you're better setting this up as a script to run from a
Rule on an individual message (item 1 of (get current messages)) than as a
tail to a receiving schedule. Just run your regular Send & Receive All
schedule and have the Rule enabled.
--
Paul Berkowitz
On 5/26/01 10:57 AM, "_1+/-e! <+> [X +1] email@hidden : (n)"
<email@hidden> wrote:
>
hallo,
>
>
ok+
>
>
i hav outlook express set-up.
>
>
i kan open program via appleskript.
>
>
i kan send & receive. (notably receive)
>
>
ok+
>
>
skript:
>
>
>
tell application "Outlook Express"
>
activate
>
try
>
-- New rule
>
input state {keys down:"m", command key bit:true}
>
end try
>
try
>
>
-- New rule
>
input state {keys down:"t", option key bit:true, command key
>
bit:true}
>
end try
>
try
>
-- New rule
>
input state {keys down:"a", command key bit:true}
>
end try
>
>
>
end tell
>
>
howver, i kannot figure out how to select all uithout having
>
to close and re-open program.
>
>
afterwrds, may i please make addition:
>
>
>
i would to save all messages to a folder.
>
>
open messages -one at a time- uith other distruktive synthesis
>
program
>
>
save each new and re-deliver to original sender.
>
>
>
of kourse, first problam is uith abov.
>
>
>
any assistance may be wonderfully appreciated.
>
>
friendli.ekaterina
>
>
>
>
perhaps, i
>
>
Shane Stanley wrote:
>
>
> On 25/5/01 2:33 AM +1000, _1+/-e! <+> [X +1] f : (n),
>
> email@hidden, wrote:
>
>
>
>> my end goal is to extrakt information from an e-mail,
>
>> send it to another applikation for prozessing.
>
>>
>
>> is this possibl+?
>
>
>
> Definitely. But it looks like you are using Netscape for your mail,
>
> and I
>
> don't think it's possible from that application. You would have to
>
> change to
>
> a new mail application, like Outlook Express, Entourage, Eudora, or
>
> one of
>
> the other scriptable mail applications.
>
>
>
> --
>
> Shane Stanley, email@hidden
>
> _______________________________________________
>
> applescript-users mailing list
>
> email@hidden
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users