by dalanik on Wed Jul 04, 2007 9:04 am
You need to use Girder plugin TaskCreate or TaskSwitch in order to detect when each program has focus. Then create separate sets of commands for each buttonpress for each program.
I.e. I have 2 main groups of commands in girder. 1st one only detects which program is running in FOREGROUND via TaskCreate plugin. Then it enables a group in 2nd main-group for that particular program, and disables all other groups (other programs).
The 2nd group has commands per remote button per program which executes what you want to do in that particular program.
I.e. 2 main groups are TASKSWITCH and PROGRAMS:
TASKSWITCH
=== TaskCreate XLOBBY (xlobby is foreground and taskcreate detects this)
=== === ENABLE XLOBBY
=== === DISABLE ZOOMPLAYER
=== TaskCreate ZOOMPLAYER (zoom is foreground and taskcreate detects this)
=== === DISABLE XLOBBY
=== === ENABLE ZOOMPLAYER
PROGRAMS
=== XLOBBY (enabled)
=== === PLAY
=== === === send command to XLobby to play music
=== ZOOMPLAYER (disabled)
=== === PLAY
=== === === send command to ZoomPlayer to play video
As you can see, play button does different things in ZoomPlayer and Xlobby, because TASKSWITCH group disables/enables appropriate group when that program is active (forerground). In 2nd group, only 1 of ZOOM/XLOBBY is active.
I know it sounds a bit complicated, but once you set it up it works great, and you can add as many programs as you want.
D.