IRCONTROLLER
IRCONTROLLER
- Subject: IRCONTROLLER
- From: Ralf <email@hidden>
- Date: Fri, 17 Dec 2010 16:28:51 +0100
Sorry for maybe repeating my post but I´m not quiet sure if my mail was sent.
Im trying to disable and enable IRController via Script to build a simple toggle.
I found the following script but it doesnt work.
Maybe you´ll have any ideas what might be wrong.
Thanks for your answer.
try set currentValue to (((do shell script "defaults read /Library/Preferences/com.apple.driver.AppleIRController DeviceEnabled") as integer) + 1) set status to item currentValue of {"disabled", "enabled"} set button to (display dialog "Set remote control infrared. Right now it is " & status & "." buttons {"Cancel", item currentValue of {"Enable", "Disable"}} default button 2) do shell script "defaults write /Library/Preferences/com.apple.driver.AppleIRController DeviceEnabled -bool " & item currentValue of {"yes", "no"} with administrator privileges end try |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden