Re: Entourage : Returning info from multiple new messages
Re: Entourage : Returning info from multiple new messages
- Subject: Re: Entourage : Returning info from multiple new messages
- From: Barry Wainwright <email@hidden>
- Date: Tue, 16 Aug 2005 00:33:19 +0100
- Thread-topic: Entourage : Returning info from multiple new messages
On 15/8/05 23:49, "Jay Louvion" <email@hidden> wrote:
>
> I have made good progress in a script that handles incoming messages, printing
> them if their subject meets the right requirements, searching the disk for a
> disk image if the content of the message contains certain text.
>
> I now need to know how to handle multiple incoming messages or multiple
> selections (those would be for the testing, essentially): how different is it
> from the following script:
>
> tell application "Finder"
> set startupdisk to startup disk as string
> end tell
> tell application "Microsoft Entourage"
> set ATD to AppleScript's text item delimiters
> set AppleScript's text item delimiters to " "
> set image_source to startupdisk & "DVDimages:" as alias
> set save_target to startupdisk & "Users:ptilu:DVDimages:" as alias
Change this line:
> set theMsg to item 1 of (get current messages)
to:
Repeat with theMsg in (get current messages)
> set {theSubject, theContent} to theMsg's {subject, content}
> set eventcode to text item 1 of theSubject
> set ordernum to text item 2 of theSubject
> set MailNr to text item 3 of theSubject as integer
> set AppleScript's text item delimiters to ""
> set shortnum to (items 3 thru end of ordernum) as string
> if items 1 thru 2 of ordernum is not {"L", "G"} then
> beep 6
> return
> end if
> set theLink to {}
> if MailNr is 5 then
> set BeginLink to
> "http://www.apple.com/bin/document?format=delivery&orderid="
> set shortnum to items 3 thru end of ordernum as string
> set theLink to BeginLink & shortnum
> end if
Remove this line:
> end tell
> set AppleScript's text item delimiters to ATD
> if the theLink is not {} then
> set theDownload to (startupdisk & "incoming.pdf" as text)
> tell application "URL Access Scripting"
> download theLink to file theDownload
> end tell
> tell application "Finder"
> print theDownload
> move file theDownload to trash
> end tell
> end if
And add these:
End repeat
End tell
>
> Thanks in advance,
>
> J.
>
>
>
> Jay Louvion
> Studio Casagrande
> 3, rue Müller-Brun
> 1208 Geneva
>
> T+4122 840 3272
> F+4122 840 3271
>
> skypeme:
> jaylouvion
>
> www.studiocasagrande.com
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
--
Barry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden