我想找到一種方法來報告硬件溫度回到我沒有一個程序,我不得不下載,我知道很多做的顯示,但不報告回到遠程位置上的網絡。硬件溫度報告
我發現了一個applescript,我可能會修改它以使其正常工作,但我目前正在步驟1中停止運行腳本。
下面是我找到的腳本。我一直在標線得到一個錯誤,幸運的13行 錯誤只是說不能得到項目17
set the_result to (do shell script "ioreg -c IOHWSensor | grep -vE '\\{|\\}|\\+\\-o'")'s paragraphs
set all_display to ""
repeat with i from 0 to 16
set jump to 3
set the_location to item (3 + (jump * i)) of the_result
set the_location to characters 41 thru ((count of characters of the_location) - 1) of the_location as string
set the_type to item (4 + (jump * i)) of the_result
set the_text to item (2 + (jump * i)) of the_result as string
**set the_text to characters 44 thru (count of characters of the_text) of the_text as string --(length of item 2 of the_result)**
set the_type to characters 37 thru ((count of characters of the_type) - 1) of the_type as string
if the_type = "temperature" then
set all_display to all_display & "
" & the_location & ": " & ((the_text/65536) * (9/5)) + 32 & " F" as string
end if
end repeat
display dialog all_display
我與這一次終於能夠得到完整的錯誤 錯誤玩弄:無法將「| | | | | \」version \「= 2」中的字符44到41轉換爲字符串類型。
10.6.8 我的理解是,雖然所有的英特爾Mac的將在很大程度上類似。 顯然,如果他們不是那會是一個問題。 但是,此腳本在溫度之前出錯。 – 2012-08-06 12:32:36
我的觀點是,它永遠不會找到溫度關鍵字。無論如何,你可以簡單地刪除| grep -vE'\\ {| \\} | \\ + \\ - o'從腳本運行並再次運行。它試圖擺脫+ o \ |符號。 – artapet 2012-08-08 05:12:38