Friday, December 26, 2008

GreenButton


Override Green "Talk" Button functionality

How does this work?

GreenButton is an Open Source Windows Mobile 5.0+ program. It runs in the background as a very tiny executable (1kB) that waits for the Green Button (otherwise known as the "Talk" button) to be pressed. At that time, the specified program will be executed.

Advanced Configuration

GreenButton stores several settings in the registry under HKCU/Software/Supware.net/GreenButton:

HandleNormally
SendKeys
Activate
Run
This is how GreenButton interprets these settings when the green button is pressed (in this order):

If the active window text is found in the "HandleNormally" setting, then GreenButton will just return.
Else If a call is in progress, GreenButton will just return.
Else If the active window text is found in the "SendKeys" setting, then GreenButton will send that window WM_KEYUP / WM_KEYDOWN window messages.
Else If the class name specified by "Activate" setting is found, then GreenButton will activate that window.
Else If a command was specified from the command line, GreenButton will run that command.
Else, GreenButton will run the command specified in the "Run" setting.
How do I specify a program from the command line?
The default program built into GreenButton is iDialer (installed on device). But with a command line option, any program can be executed.

How do I change the program?
GreenButton is activated upon startup by a shortcut placed in "\Windows\Startup". Edit that shortcut (easiest to do over ActiveSync) and add your program as an argument (this example will execute Pocket IE upon Green Button press):

44#"\Program Files\GreenButton\GreenButton.exe" \Windows\iexplore.exe

GreenButton

No comments: