Title: Re: Script To Delete & Close Message Windows
On or near 6/22/02 1:15 PM, greg at [EMAIL PROTECTED] observed:
> Hi George,
>
> This one worked great but what if some of the messages selected do not have
> open windows?
>
If a selected message had no window, it would not get deleted. This affects, as George said, "only messages that are both selected and open".
So, what is it you want to do? Delete all messages that are selected, and, if they have open windows, close them? To do that, I think this will work:
tell application "Microsoft Entourage"
set winlist to every window
set msglist to current messages
set idList to {}
repeat with aMsg in msglist
copy ID of aMsg to end of idList
end repeat
repeat with thewin in winlist
if class of thewin is message window then
if (ID of displayed message of thewin) is in idList then close thewin
end if
end repeat
repeat with theMsg in msglist
delete theMsg
end repeat
end tell
--
My web page: <http://home.earthlink.net/~allenwatson/>
My scripts page: <http:homepage.mac.com/allenwatson>
Microsoft MVP for Mac Entourage/Word--<[EMAIL PROTECTED]>
- Script To Delete & Close Message Windows greg
- Re: Script To Delete & Close Message Windows George Clark
- Re: Script To Delete & Close Message Wind... greg
- Re: Script To Delete & Close Message ... Allen Watson
- Re: Script To Delete & Close Mess... greg
- Re: Script To Delete & Close... Allen Watson
- Re: Script To Delete & Close Mess... Christopher Robbins
- Re: Script To Delete & Close... Allen Watson
- Re: Script To Delete & C... Paul Berkowitz
- Re: Script To Delete &am... Allen Watson
- Re: Script To Delete &am... Christopher Robbins
- Re: Script To Delete & Close... Paul Berkowitz
