/ entropy-stop.applescript
entropy-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 "entropy") 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 "Entropy encountered an error while shutting down (stop.sh)" 10 end try 11 tell progress indicator "eprogress" of window "main" to stop 12 end clicked 13