Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'My variation on the same script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
My variation on the same script
Authored by: efoivx on Dec 08, '01 10:06:56PM
This is my script that I use. I cleaned it up and added variables to turn features on and off. Copy and paste it into a script, set the variables at the top of the script and that's it.
--Set user definable Configs
set displayDialogs to 1 --change the 0 to just use Speech
set UseSpeech to 0 -- chnge to 1 to have Speech tell you IF Classic is running or not
set i to 8 -- seconds to wait before dismissing the dialog automatically 0 is off
-- End user definable configs

-------------------------- Begin Script
if displayDialogs = 0 then
set UseSpeech to 1
end if
tell application "Finder"
if (name of (every application process)) contains "Classic Support" then
activate
if UseSpeech = 1 then
say "Classic is running."
end if
if displayDialogs = 1 then
beep
display dialog "
Classic is running. Shutdown Classic?" buttons
{"Yes", "No"} default button "No" with icon caution giving up after i
set the btnRetrnd to the button returned of the result

if the btnRetrnd is "Yes" then
tell application "Classic Support" to quit
end if
end if
else --classic is not running
activate
if UseSpeech = 1 then
say "Classic is not running."
end if
if displayDialogs = 1 then
beep
display dialog "Classic is not running. Startup Classic?" buttons
{"Yes", "No"} default button "No" with icon caution giving up after i
set the btnRetrnd to the button returned of the result
if the btnRetrnd is "Yes" then
tell application "Classic Startup" to activate
end if
end if
end if
end tell


[ Reply to This | # ]