Re: Correction - AppleScript and Email clients
Re: Correction - AppleScript and Email clients
- Subject: Re: Correction - AppleScript and Email clients
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 10 Jan 2002 12:12:17 -0800
That's because I had an error: it needs to be 'outgoing message'. And you
can send the message and then quit without dialogs if you check for
'connection in progress':
OE and Entourage have basically the same scripting implementation for email,
but it meant I didn't test it. Forgetting about 'outgoing' was dumb of me.
The other problem occurred to me later. This should get around it:
tell application "Outlook Express"
set newMsg to make new outgoing message at out box folder with
properties {subject:"foo", content:"Hello, how are you, goodbye",
recipient:"Joe Schmo <email@hidden>"}
send newMsg
repeat while connection in progress
--delay 1 -- optional, maybe better without
end repeat
quit
end tell
It should work fine, as long as you don't have any other unsaved message
windows open. If you might, add this somewhere:
set allWindows to (every draft window)
repeat with theWindow in allWindows
close theWindow saving yes
end repeat
Saved message windows should close on quit without an alert (or add them
too).
--
Paul Berkowitz
>
From: rhyme <email@hidden>
>
Date: Thu, 10 Jan 2002 20:53:47 +0100
>
To: Paul Berkowitz <email@hidden>, Applescript-Users
>
<email@hidden>
>
Subject: Re: Correction - AppleScript and Email clients
>
>
It doesnt work !! It doesn't create new message..........
>
....anyway.... i 've done this one :
>
>
tell application "Outlook Express"
>
activate
>
set theMSG to make new draft window with properties {to
>
recipients:"email@hidden", subject:"subjectText"}
>
send theMSG
>
quit
>
end tell
>
>
It's similar but OE doesn't quit after sending MSG but during the action, so
>
it ask me if i want to quit .
>
I wont to make a script that tell OE to quit after the MSG has been mailed
>
>
> Da: Paul Berkowitz <email@hidden>
>
> Data: Wed, 09 Jan 2002 09:58:29 -0800
>
> A: Applescript-Users <email@hidden>
>
> Oggetto: Re: Correction - AppleScript and Email clients
>
>
>
> tell application "Outlook Express"
>
> set newMsg to make new message at out box folder with properties
>
> {subject:"foo", content:"Hello, how are you, goodbye",
>
> recipient:"email@hidden"}
>
> send newMsg
>
> quit
>
> end tell
>
>
>
> --
>
> Paul Berkowitz
>
>
>
>> From: rhyme <email@hidden>
>
>> Date: Wed, 09 Jan 2002 18:10:41 +0100
>
>> To: David Groover <email@hidden>,
>
>> <email@hidden>
>
>> Subject: Re: Correction - AppleScript and Email clients
>
>>
>
>> But i want to write it in AppleScript ! not to impost outlook !
>
>>
>
>>
>
>>> Da: David Groover <email@hidden>
>
>>> Data: Wed, 09 Jan 2002 10:38:46 -0500
>
>>> A: rhyme <email@hidden>
>
>>> Oggetto: Correction - AppleScript and Email clients
>
>>>
>
>>> I reposted this to the list. As I sent my first reply to you off list, I
>
>>> though I had better send you my correction as well. Dave Groover
>
>>>
>
>>> CORRECTION - (oops)
>
>>>
>
>>> Should have had the coffee first. Transposed the last two items. What
>
>>> follows is correct:
>
>>>
>
>>> (In OE)
>
>>> Check the schedule (Run Schedule: Edit Schedule: double click on the bolded
>
>>> one you are using to send mail). At the bottom check "Return to Previous
>
>>> State". It also has "Close" or "Stay Connected". While the first two would
>
>>> work, "Close" would only be a wise choice if you never intend using
>
>>> Explorer
>
>>> while you are using the script. Because it will close your connection when
>
>>> it is through, even if you are downloading something at the time.
>
>>>
>
>>> Best to check "Return to Previous State" (when the message has been sent)
>
>>>
>
>>> Sorry for the confusion
>
>>>
>
>>> Dave Groover
>
>>>
>
>>>> From: rhyme <email@hidden>
>
>>>
>
>>>> How can i tell OutlookExpress to quit after sending msg ???
>
>>>> Is it possible ?
>
>> _______________________________________________
>
>> applescript-users mailing list | email@hidden
>
>> Help/Unsubscribe/Archives:
>
>> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
>> Do not post admin requests to the list. They will be ignored.
>
> _______________________________________________
>
> applescript-users mailing list | email@hidden
>
> Help/Unsubscribe/Archives:
>
> http://www.lists.apple.com/mailman/listinfo/applescript-users
>
> Do not post admin requests to the list. They will be ignored.