I want "IOKit Scripting"
I want "IOKit Scripting"
- Subject: I want "IOKit Scripting"
- From: Takaaki Naganoya <email@hidden>
- Date: Mon, 15 Dec 2003 02:48:12 +0900
Now, we can aquire various status of system by using "ioreg" command via do
shell script.
For example, sound input level, sound output level, brightness of backlight,
speed of network connectionm the name of AirPort base station and so on.
We can "set" the level of sound output but can't "get" the level of it.
So, I made various sub-routines to aquire each information of system status.
For example...
--aquire audio oout/in level as number
on getAudioLevel()
set prepList to {{"left_out", 3, 3}, {"right_out", 4, 3}, {"left_input",
8, 2}, {"right_input", 9, 2}}
set a to do shell script "ioreg -l | grep IOAudioControlValue"
set aList to paragraphs of a
set outList to {}
repeat with i in prepList
set itemNo to item 2 of i
set itemGet to item 3 of i
set targetData to item itemNo of aList
set tagList to characters of targetData
set wholeCount to length of tagList
if item (wholeCount - itemGet) of tagList = "=" then
set itemGet to itemGet - 1
end if
set getData to items (wholeCount - itemGet) thru wholeCount of
tagList
set getData to getData as text
set the end of outList to {item 1 of i, getData}
end repeat
return outList
end getAudioLevel
---
Each informations are very useful but it is a little difficult for the entry
level scripters to pick up each information.
So, I suggest to Apple to provide "IOkit Scripting" to get system
information. It seems very easy to make it.
GUI Scripting can set and get the GUI status, I hope "IOkit scripting" wil
be get and set the information of various status of system.
Thank you.
--
Takaaki Naganoya
Director
Newt On Division/EIG K.K.
http://eig.jp/kotodama/
ichat: email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.