I wrote this little script to restart SIMS. I am just starting to put it 
into full time use, and it seems to work so far. I should have a better 
idea of it's effectiveness after a week or so.

Anyway if you want to try this at your own risk, here it is. Note that 
this assumes you are running OS X and SIMS in the classic environment. 
It also assumes that their is no SIMS alias in your startup items 
folder. If you make any improvements, I would appreciate a copy if you 
don't want to post it to this list.

Thanks,
Kevin

--begin SIMS Relaunch script
ignoring application responses
        tell application "SIMS-PPC" to quit
end ignoring

delay 5

set SIMS_has_quit to true

tell application "System Events"
        set the_Processes to name of processes
end tell

if the_Processes contains "SIMS-PPC" then
        set SIMS_has_quit to false
end if

if not SIMS_has_quit then
        --SIMS has failed to quit, we must kill it
        set result_text to do shell script "ps -xw | grep TruBlueEnvironment"
        
        set AppleScript's text item delimiters to return
        set result_lines to every text item of result_text
        
        repeat with a_line in result_lines
                if a_line contains "/System/Library/CoreServices/Classic 
Startup.app/Contents/Resources/TruBlueEnvironment" then
                        set the_PID to first word of a_line
                        do shell script "kill " & the_PID
                end if
        end repeat
        
end if

tell application "SIMS-PPC" to launch


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[EMAIL PROTECTED]>.
To unsubscribe, E-mail to: <[EMAIL PROTECTED]>
To switch to the DIGEST mode, E-mail to <[EMAIL PROTECTED]>
To switch to the INDEX mode, E-mail to <[EMAIL PROTECTED]>
Send administrative queries to  <[EMAIL PROTECTED]>

Reply via email to