PDA

View Full Version : Trigger Command



TiraUser
April 10th, 2003, 01:32 PM
Hello,

Is there a way to trigger a command based on the existence of a file? Also, is there a way to trigger a command based on certain data being in the clipboard or if a certain combination of keys are pressed? Or do all events need to be triggered through a remote or girder event?

I've been experimenting but have not been able to trigger a command without using a remote. I'm sure I'm just doing something foolish because I'm new at Girder. Any help in the right direction is appreciated.

Thanks

martin5
April 10th, 2003, 03:07 PM
Hi there!
How to trigger commands based on (i) combination of key presses and (ii) clipboard content:

(1) Make sure you have the keyboard plugin activated (file > settings > plugins > check keyboard box)

(2) for (i), make a command, press learn event, press the key combination (for example ctrl + w). Girder should now trigger the command whenever the key combination is pressed.

(ii) is trickier. This works for plain text added to the clipboard via ctrl+c:
- make a multigroup
- Learn the keyboard event: ctrl+c (press learn, then press ctrl+c)
- add command to multigroup: girder > clipboard to variable (enter a unique variable name in the Icon/Device field, for example: CLIPBOARDVALUE)
- add a second command that does what you want with the string in CLIPBOARDVALUE.
For example: girder > simple OSD (enter [CLIPBOARDVALUE] in Icon/Device). Text added to clipboard via ctrl+C should now appear in OSD. A more complex second command can consist of a Lua-script that filters the clipboard value and triggers some girder command only if it matches some set of criteria.

TiraUser
April 10th, 2003, 03:30 PM
Hello again,

Thanks for the step in the right direction.

Maybe there is something wrong with my Girder. I have the keyboard plug in checked and it says it is loaded into memory. When I click learn event after adding a command all Girder says is 'Waiting for IR Code'. When I press a key combination (ex: CTRL+W) nothing happens. Girder just continues 'Waiting for IR Code'. Do you know what might be going on with my Girder v3.2.9 on win2k?

Thanks

TiraUser
April 10th, 2003, 03:34 PM
Well, I got the keyboard command to work. I don't know how, nothing changed but it worked. Thanks for the help. I'll give both your examples a try now! :lol: