Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   [info] AppleScript to Work Around SD & Intel 10.4.8 Issues (https://www.shirt-pocket.com/forums/showthread.php?t=1977)

Mr. CoBalt 01-04-2007 01:10 PM

[info] AppleScript to Work Around SD & Intel 10.4.8 Issues
 
As a recent purchaser of a copy of SuperDuper destined to do nightly backups on a Mac Pro server I had read all about the strange issues with 10.4.8 on Intel systems. In the end I decided on going with SD anyway... it's just so good that even with the risk of crashes it's better than the alternatives. :D Plus, I'd already bought it ;)

In any case, not wanting to bother Dave with some more support requests for an issue that's basically out of his control, I decided to finagle a workaround that would avoid the crashes to begin with. It uses the prescribed "hide the app" fix and while the AppleScript is pretty basic (to say the least) it gets the job done when SuperDuper is on a scheduled run late at night and nobody's around:

Code:

(* SuperDuperHider (v01) by Matt Tracey
        - A workaround to SD crashes on Intel 10.4.8 systems
        - Start it up, leave it running, and walk away :*)

on idle
        try
                tell application "System Events" to (name of processes) contains "SuperDuper!"
                set superduper_running to result
                tell application "System Events"
                        if superduper_running is true then
                                if visible of process "SuperDuper!" is true then
                                        set visible of process "SuperDuper!" to false
                                        activate
                                        display dialog "SuperDuper! was hidden to prevent a possible crash!" buttons {"Stop Doing That!", "Thanks!"} default button 2 giving up after 5
                                        if button returned of result is "Stop Doing That!" then
                                                tell application "SuperDuper!" to activate
                                                tell me to quit
                                        else
                                                return 8
                                        end if
                                end if
                        end if
                end tell
        end try
end idle

In order to get this to work (and run natively on Intel systems) just copy and paste the above code into Script Editor (located in /Applications/AppleScript) and then "Save As..." with file format "application bundle" and only the "Stay Open" box checked. Whatever name you give it will work fine, although SuperDuperHider has a nice ring to it :cool: Then just launch the resulting program (whatever its name may be) and let it do its thing in the background. I've also added it to the login items on my server so it'll start automatically if the system ever unexpectedly restarts.

Anyways, I hope this helps anybody that may be encountering the same issues :)

dnanian 01-04-2007 03:39 PM

Thanks, Matt. Note that the problem should not occur with Smart Updates after you've fully backed up a 10.4.8 system. So, hiding during the first backup (and restarting before and after) will be sufficient, subsequent smart updates of that backup should not trigger the OSX problem.

Mr. CoBalt 01-04-2007 04:07 PM

Good to know Dave. We are using Smart Updates but we have enough rotating backup drives that every now and then there's a blank disk being introduced or one that's changed enough that it might need some more attention. I figured better safe than sorry so I just leave the script running all the time. Seeing as how the idle loop uses maybe 0.01% of one of the four available cores it seems fairly painless :D

In any case, thanks for the great software. It makes my job a lot easier :)


All times are GMT -4. The time now is 05:05 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.