View Single Post
Old 01-04-2007, 02:10 PM
Mr. CoBalt
Posts: n/a
Post [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. 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:

(* 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
		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
					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
						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 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
Reply With Quote