On Fri, Jul 14, 2006, Dave Nathanson said: >Sonofagun! That works! :-) >Thanks Andy & Wayne!
You're welcome. >I was trying to use "with saving" but without a good example, I was >headed in the wrong direction. This script does exactly what I was hoping >for! It should be archived in the CTM PowerMail AppleScript archives. >(However you do that). I don't see where to submit a script so that it's on the tools page? >Is there any way to get launch PowerMail so it will display the same >windows that were open when it was last quit? That would help keep me on >track. Nope. At least not that I can think of. Any saved drafts will appear at the top in the Out Tray. >in reply to ([EMAIL PROTECTED]), Andy Fragen's message of 8:50 AM, 7/14/06 > >>Hey guys. Try this. >> >><applescript> >>set targetApp to "PowerMail" >>tell application "System Events" >> set processExists to exists process targetApp >>end tell >> >> >>if processExists is true then >> tell application "PowerMail" >> repeat with i from 1 to (count of windows) >> try >> if window i is modified then >> close window i with saving >> end if >> end try >> end repeat >> quit >> end tell >>end if >></applescript> >> >>Andy >> >>-- >>Andy Fragen >> >>On Fri, Jul 14, 2006, Wayne Brissette said: >> >>>An open window is not considered a message, because it's not a message >>>there isn't any way to use any of the standard AppleScript commands on >>>the window. So, you have to use the Window commands. While there are a >>>bunch of window commands, one is not save or save as draft. -- Andy Fragen

