| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » GetSample(string) | Version 2.2 |
GetSample 関数は、指定した文字列に基づく使用率を数値で返します。
各使用率をテーブルに保存し、その内容を表示します。
Lua |
return function() -- Gather the sample information in a table local sample = {} sample["MEMORY"] = GetSample("MEMORY") sample["CPU"] = GetSample("CPU") sample["CPUTEMP"] = GetSample("CPUTEMP") sample["GPUTEMP"] = GetSample("GPUTEMP") sample["SYSTEMP"] = GetSample("SYSTEMP") sample["FANRPM"] = GetSample("FANRPM") -- Print the collected data Printf("Memory ; ".. sample["MEMORY"]) Printf("CPU ; ".. sample["CPU"]) Printf("CPU temperature ; ".. sample["CPUTEMP"]) Printf("GPU temperature ; ".. sample["GPUTEMP"]) Printf("System temperature ; ".. sample["SYSTEMP"]) Printf("Fan RPM ; ".. sample["FANRPM"]) end |