/ samizdat-stop.applescript
samizdat-stop.applescript
 1  on clicked theObject
 2  	try
 3  		-- Read in the preferences
 4  		set theLocation to POSIX path of (call method "defaultObjectForKey:" with parameter "samizdat")
 5  		do shell script "cd " & theLocation & ";sh stop.sh"
 6  	on error
 7  		-- didn't put a try on the running of stop.sh because we won't be able to capture the 
 8  		-- the result for display, ergo this really is the try. exec cmd again to get result
 9  		display dialog "Samizdat encountered an error while shutting down (stop.sh)"
10  	end try
11  	tell progress indicator "sprogress" of window "main" to stop
12  end clicked
13  
14  
15