>Hi Wayne & Jay, >Thanks for your speedy replies. > >Wayne, I used your addition & ran the script with open unsaved outgoing >messages. PowerMail still popped up a dialog box anyway (asking if we >should save changes to the message... before closing it). Remember, I am >trying to save these unsaved messages, not discard them - as I suspect >"ignore" might do if it worked.
I did some more work on the script and quite honestly, I'm a bit stumped (I'm also a bit rusty with my AS since I don't use it daily anymore). 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. If a window is open and you try to close it, it will either close (if no modifications have been made to it) without saving, or prompt you and ask what you want done. Since you want these saved as drafts, that's possible, but it requires human interaction. The solution? I suspect, I'll have to script the buttons, but I didn't have time to play around with that option this morning. I'll try to work on that this weekend. Wayne -- "Nature can survive without man--in fact, that may be its salvation--but man cannot survive without nature." - Homero Aridjis

