CPU温度計
ノートPCが熱暴走したので。底面の吸気口が下敷きのチラシ紙を吸着したのかも。PC下に筆箱を挟んで空気の通りをよくしてからは再発せず。
管理者として実行します。
CPU温度計.hta
<html>
<head>
<script language=vbscript>
resizeTo 200,100
Set WMI=GetObject("winmgmts:\\.\root\WMI")
Sub window_onload
For Each oItem In WMI.ExecQuery("SELECT * FROM MSAcpi_ThermalZoneTemperature")
t=(oItem.CurrentTemperature - 2732) / 10
d1.innerText=t
d2.style.width=t
If t>90 Then
d2.style.backgroundColor="red"
ElseIf t>80 Then
d2.style.backgroundColor="orangered"
ElseIf t>70 Then
d2.style.backgroundColor="orange"
ElseIf t>60 Then
d2.style.backgroundColor="yellow"
Else
d2.style.backgroundColor="blue"
End If
document.title=t & String(t/10-5,"■")
setTimeout "window_onload",10000
Next
End Sub
</script>
</head>
<body>
<table border=0>
<tr>
<td id=d1></td><td><div id=d2 style="background-color: red; width: 142px; font-size:10px;"> </div></td>
</tr>
</table>
</body>
</html>
« 信頼済みサイトに含まれるスクリプトサイト一覧を取得するブックマークレット | トップページ | Webページを一定時間ごとに自動更新する。 »