[Help
Index]
Configuring App Control :
This screen has a simple layout for managing the two lists. The left list
maintains the list of applications which X10Dispatcher can control, and the right
list represents the list of features available for the application selected in the
left list. When adding an application you need to enter either a Window Title
or a Window Class, most often you will be entering a Window Title. Once that
application has been added, make sure to click on it (selecting it), and then add
features to it. Adding a feature requires both a feature name and a feature
Command ID... the feature name can be anything meaningful to you, the feature Command
ID must be a number representing the actual Command ID for the particular function
you want to automate (like a menu item or a button press, etc). I will leave
the gritty details of determing those Command IDs for the following detailed tutorial.
Detailed Tutorial : The remainder of this topic is devoted to a
detailed tutorial of how to determine and add your own favorite applications to
the list of controllable external applications. If this does not interest
you, stop reading now.
For computer users who dare
to peek into the murky innerworkings of applications i will describe how you determine
the codes available below :
I will use windows media
player as an example. Windows media player has menu options for almost every feature
so i will just use those.
First i load windows media
player. I will also configure the menu bar to stay visible... this is mainly important
for step 3 but since most apps dont hide menu bar this is probably specific to wmp.
Second : you
will need a program to spy on the messages which are sent when menu items and buttons
are pressed. As a programmer, my programming tools come with such a program (called
Spy++), but you can download a program like this for free. One such program can
be downloaded at
http://www.windows-spy.com (I will base
my instructions off the use of this app).
Third : install and
run winspector (with media player already running).. arrange windows so that both
are visible side by side. Take the crosshair icon in winspector and drag it over
the title bar of Windows Media Player (thats why you made that title bar visible
always) .. once you are over the title bar and see the box drawn around the entire
window, release mouse. Windowspector should now have Windows Media Player listed
and highlighted in its window list. Right click that selected item and select messages.
Fourth : Dont be frightened if a flood of messages appear in the winspector message
window. Right click on the messages window in winspector and select 'Filter Messages'
and then 'Edit Message Filter'. Select the filter all button to clear out the list
on the right and then look for WM_COMMAND in the list on the left and then double
click it to add it to list on right.
You should now have a list on the right which
has only one entry : WM_COMMAND. Click OK and you are ready to spy.
Fifth : Poke around the menus
(of windows media player or whatever app you want to control) and when you find
the menu item you want to add control to, then actually select that menu option
and the WM_COMMAND will be 'seen' by WinSpector and will appear in the Messages
window (maybe twice but thats not important.) Now go over to that messages window
and click the plus symbol next to the last WM_COMMAND and it will contain a ControlID
value (like a 5 digit number... something like 18810)... THAT IS YOUR FEATURE ID/CONTROL
ID that you plug into x10dispatcher.
Sixth : x10dispatcher needs
only two pieces of information to send a command to an application, 1) The Window
Title or Window Class of the window, and 2) the featureid/controlid you found in
previous step. Since windows media player always has same title, you can just use
that 'Windows Media Player' as the Window Title Setting. Some programs like winamp
mess around with the title bar so it might be more reliable to use the window class...
this window class can be found in winspector (its what is in parentheses in the
title bar of the winspector Messages window as you are grabbing codes.... WMPlayerApp)
Thats it for windows media
player, you would just repeat this until you got the controlid of all the features
(play, stop, next, etc..).
Winamp was different, the
menu bar is not standard there and they didnt have many options... but the buttons
worked so i just grabbed the codes generated by pushing the play, pause, stop, etc.
buttons. I also used the window class for winamp (you only need one or the other...
window title or window class).
Hopefully this is not too difficult or daunting to do to program the codes for your
particular application, but perhaps the brave people who do gather these commands
will share them (several already have), so that not everybody needs to. And once
you have those codes, you never need to run winspector again (and you can even uninstall
it) unless you find another program you want to control and find out codes for.