AppleScript名:CPUのBrand Nameとバス速度を表示 |
set aTargLabel to "machdep.cpu.brand_string:" set aRes to retFilteredSysctrlValue(aTargLabel) of me –> "Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz" set bRes to retFilteredSysctrlValue("hw.busfrequency_max") of me –> " 100000000" return {aRes, bRes} –> {"Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz", " 100000000"} on retFilteredSysctrlValue(aTargLabel) set aRes to do shell script "sysctl -a | grep " & aTargLabel set aLen to length of aTargLabel set bRes to text (aLen + 2) thru -1 of aRes return bRes end retFilteredSysctrlValue |
More from my site
(Visited 66 times, 1 visits today)
第8世代Intel Core搭載Mac新モデルでもHaswellと返すsystem info – AppleScriptの穴 says:
[…] 正確なCPU Brand nameを取得するには、こちらの「CPUのBrand Nameとバス速度を表示」を使ってください。 […]