View Full Version : some Girder questions: keyboard input

February 10th, 2005, 07:31 PM
Too many questions (I've already searched the FAQs and forums):

What's the difference between "alternative" and not "alternative" for keyboard input?

I tried the downloaded PowerDVD controls and couldn't get it work at all until I changed every command to use the Alternative input, and to target the foreground application. Is this a PowerDVD issue, or targeting? How do you debug your Girder setup?

I have a "multimedia" keyboard with some keys on it "play/pause" "next" "previous" "stop" which seem to control several applications (WMP 10, PowerDVD). Can I get these with keyboard commands? There are some "special keys" in the drop-down menu for keyboard events that include PLAY and PAUSE, but I can't tell if they're really the same.

If I want command that *both* launches an application and *also* shows on the OSD that it is doing the launch, I have to do that with a multigroup and two events? Launching applications is often slow, so I want some feedback that the event is happening, and OSD seems like the right way, but it complicates the programming to have to make every command into a multi-group.

February 11th, 2005, 04:27 PM
The alternate just try´s a different method for making the app think the user is pressing a key. powerdvd is a ·&/· app to control. and each release is different. if you have it working, please upload the file to developer/upload.

every MM keyboard is different. you may need the HID plugin to control of the keys.

you can do a multigroup with the launch command and an osd.

February 13th, 2005, 10:34 PM
I'm making progress, but I keep on going back and forth about how to best enable/disable groups depending on which application is now being controlled.

My situation is that I'm trying to build up IRA-based remote control (using a Harmony remote) for a PC to run Photos (Picasa), DVDs (PowerDVD), Music (iTunes) and occasionally TV (DScaler? Is there a better free TV program?). I have the Harmony set up with remote codes from a left-over Winfast 2000 remote (I'm using an IRA mainly because of the feature that it can wake up the PC from hibernation).

Since I have a wireless mouse/keyboard, sometimes those will be used rather than the remote, and applications come and go.

* girder-initiated run application also enables groups?
I could set it up so that the girder command groups are switched only when I used Girder to start the application. I suppose this is straightforward control, but it might wind up with, say, iTunes running but the remote not working with it (if someone started iTunes with the mouse).

* Testing what's running
Should I use "Window Exists" or "Is Foreground"? I suppose with "Is Foreground" is more reliable, because only one application can be foreground, while multiple applications might satisfy "Window Exists".

I wonder sometimes about those occasional interruptions where some other background application (virus update, say) pops up and steals the focus away. I suppose I could have a remote key that does an alt-Tab keystroke to get the focus back, or even one that tries in turn to set the focus to the first app that exists in my list of remote-controllable apps.

So suppose I make a big multigroup "Is Foreground? Enable group / Disable group" combination that runs through all of the apps I want to control.

When do I trigger this? On any event? Only when I use the remote to start/close an application? I suppose 'on any event' would be more reliable, but wouldn't it run through this complex logic every time I hit any button on the IR? (Changing the volume, for example).

Do I read the hints correctly that this application/enabled group correlation will be better in Girder 4?

February 14th, 2005, 07:59 AM

I think the best (in my opinion ;)) way to do this is to have a group at the very top of your gml that functions as a big switch for enabling and disabling groups based on the IsForeground test.

You would attach the Girder OnEvent event to this this multigroup.

February 14th, 2005, 12:44 PM
I'm wondering if it's better to have two separate eventstrings:

On Event: TaskCreate
On Event: TaskSwitch

or do I really need to run the group select / deselect on every Girder event?

February 14th, 2005, 01:24 PM
Some windows do not generate a taskswitch event.... so the bullet proof way is the check everytime. Don't worry, its minimal cpu use.

February 16th, 2005, 12:02 AM
So, I'm not too unhappy with the current setup, except for a glitch with iTunes COM interface.

Whenever I start an activity, I try to make sure all of the other applications are closed (so, if I'm starting iTunes, I turn off PowerDVD and Picasa, etc.). However, before shutting down iTunes, I need to disconnect the iTunes COM interface, so I call the girder event that does that.

It seems pretty harmless, except that it displays somewhere using XP OSD, "Leaving iTunes". I can't figure out how it fires up the XP OSD for "Leaving iTunes" anyway, it seems like some kind of girder event magic that isn't clear.

Maybe I need to check some state variable, or only do the disconnect if iTunes is actually running?

Anyway, that and the glitch about shutting down iTunes with the mouse winding up crashing because of the COM interface... almost makes me want to switch to the more stupid 'keyboard commands'.

June 2nd, 2005, 02:57 PM
Earlier, I reported a glitch where shutting down iTunes with the mouse would crashing because the COM interface was in use.

This problem has gone away with the latest update of iTunes on Windows XP.