|
|
View Power On Self-Test (and S.M.A.R.T.) results via AppleScript
I don't know anything about this type of scripting. Is there any way to only have a failed S.M.A.R.T. test alert you? Currently, even if the test passes, I receive the big red stop sign.
View Power On Self-Test (and S.M.A.R.T.) results via AppleScript
Oops, I think that's because there is supposed to be a tab between "SMART Status:" and "Verified", it looks like the tab got stripped away somehow. But don't hold me to my word as I don't have a mac to test this right now. I'll reply with an updated version as soon as I get back to my mac.
You can try to replace the fourth line from bottom with this (note the longer blank between status and verified):
if post does not contain " SMART Status: Verified" thenSorry...
View Power On Self-Test (and S.M.A.R.T.) results via AppleScript
Here we go, this seems to work well:
set post1 to do shell script ¬
"/usr/sbin/system_profiler SPDiagnosticsDataType"
if post1 does not contain "Result: Passed" then
display dialog post1 buttons {"OK"} with title ¬
"Error" with icon stop
end if
set post to do shell script "diskutil info disk0 | grep SMART"
if post does not contain "Verified" then
display dialog post buttons {"OK"} with title ¬
"Hard Disk Error!" with icon stop
end if
Apologies for the previous mistakes and this long thread...
View Power On Self-Test (and S.M.A.R.T.) results via AppleScript
it worked as far as not receiving the stop sign for all S.M.A.R.T. tests. Only time will tell if it works for the error prompts. :) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|