Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A shell control script for PowerMate Other Hardware
I got a PowerMate for my birthday this year, and immediately tried it out with AppleScript. I wrote a small shell control script for the device that seems to work with any version of the software (I happen to be using 1.5.1, which is the out-of-the-box version). Here's the code: To use, put the script in your $PATH, chmod it to 755, and invoke with the command line.

Note that this script is more of a resource hog than other applications that change the Powermate settings dynamically (MenuMeters, Cee Pee You), probably because of the AppleScript/shell scripting used. But this script could be useful to many of those who want an easy way to interface with the device with any number of programs.

[robg adds: Not having a PowerMate, I don't have any way to test this one (nor am I sure what it does!).]
    •    
  • Currently 2.33 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[7,796 views]  

A shell control script for PowerMate | 3 comments | Create New Account
Click here to return to the 'A shell control script for PowerMate' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell control script for PowerMate
Authored by: wgscott on Jan 03, '08 09:54:12AM

tell application "PowerMateDaemon"

works with the latest version of the control software

It doesn't recognize tell application "PowerMateDriver" that is in the shellscript.

This hint was especially useful in that, for the first time since installing the new software, I was able to turn the LED light off for the one in my bedroom.



[ Reply to This | # ]
A shell control script for PowerMate
Authored by: wgscott on Jan 03, '08 10:02:54AM
Also, you need to escape the nested double-quotes:
	osascript -e "tell application \"PowerMateDaemon\" to set brightness to $realnum"
I realize this was likely a formatting problem, as I had to put in 3 successive escapes to get it to look right.

[ Reply to This | # ]
A shell control script for PowerMate
Authored by: wgscott on Jan 03, '08 11:34:08AM
I've modified it to do version-checking (and use zsh to make this straightforward) and I can verify this works for version 2 of the software, but would be grateful if someone could test it for version 1.

[ Reply to This | # ]