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


Click here to return to the 'An AppleScript to check SMART status on startup/login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to check SMART status on startup/login
Authored by: jakacmar on Aug 06, '04 12:29:22PM
The first section of this script (which checks for Finder and System UI Server) is MUCH longer than it needs to be. To accomplish the same thing, try:
tell application "System Events"
repeat while not exists process "Finder"
delay 1
end repeat
repeat while not exists process "SystemUIServer"
delay 1
end repeat
end tell
This will do the exact same thing with much less "work". The rest looks good and could be very useful.

[ Reply to This | # ]
An AppleScript to check SMART status on startup/login
Authored by: bynkii on Aug 06, '04 04:02:59PM

you could actually combine both checks in an if statement along with an error handler, and use the error handler to control the repeat statement. that way you only need one loop, not too



[ Reply to This | # ]
An AppleScript to check SMART status on startup/login
Authored by: baltwo on Aug 06, '04 06:51:50PM

Thanks. I submitted the hint knowing there were experts out there who could streamline the script's operation.



[ Reply to This | # ]