powermail-discuss Digest #2672 - Thursday, August 2, 2007
Re: none of my back-up PMs will start
by "Dave N" <[EMAIL PROTECTED]>
----------------------------------------------------------------------
Subject: Re: none of my back-up PMs will start
From: "Dave N" <[EMAIL PROTECTED]>
Date: Thu, 2 Aug 2007 01:29:32 -0700
Thanks to some people here, I use an applescript that SuperDuper runs
before it begins the cloning. So if PowerMail is running, it quits PM,
and saves any open messages as drafts. Use "Script Editor" to save as an
applescript "app" so SuperDuper can use it. Then look in the options for
SuperDuper to run a script before cloning. I sent this to CTM last year,
but I don't think they've gotten around to updating their website with
it yet...
Hope this helps.
Best,
Dave Nathanson
Mac Medix
===== BEGIN APPLESCRIPT ================
TITLE: Quit_PowerMail_If_Running_Save_Drafts
= = = = = = = = = = = = == = = = = = = = = = = = = = = = = = == = =
DESCRIPTION:
This script will check if PowerMail is running, and if it is, it will
Quit PowerMail after closing & "save as draft" any windows that need it.
If PowerMail is not running, it will not launch it.
Most useful to run just before your backup program runs.
Version 1.0. July 14, 2006
Credits:
Dave Nathanson for researching, determining need & requesting this.
XnetZERO for posting the process exists code on
http://bbs.applescript.net/viewtopic.php?pid=15848
Andy Fragen for the i loop & Close Window with Saving.
Wayne Brissette for helping.
CTM for making PowerMail great.
======================================================
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
=================================================================
in reply to ([EMAIL PROTECTED]), Matthias Schmidt's message of 3:45
AM, 7/23/07
>probably the database was open AND PM was writing to the database, when
>SuperDuper was reading the database.
----------------------------------------------------------------------
End of powermail-discuss Digest