cpnkirk
April 15th, 2004, 04:19 PM
I'm trying to do something that should be very simple, so I assume I'm overlooking something obvious:
I have set the GotTV plugin from MyHTPC to send events to girder. The only event I'm interested in is "WTTV.SetChannel". When Girder gets this event, I simply want it to change the STB to that channel by sending the appropriate IR codes through my USB UIRT.
I can make a command that will send any of the digits 0-9 to the box, and they work. I can tell that Girder is receiving the commands, because if I use the "WTTV.vischange" event, Girder sends out whatever I key I "learned".
The setchannel event includes several payloads, but the only one I need is pld1, which will hold the channel number. I can have GotTV send one message w/ the entire channel #, or several messages, each one have a digit of the channel.
My first thought was to set the event string to "WTTV.SetChannel[0]" and the command to transmit IR "0" to the STB. Then duplicate this for the rest of the digits. That way, Got TV could send one message per digit of the channel, and girder would send each digit to the set top box. Apparently, this doesn't work. So, I thought maybe putting [0] at the end of the message wasn't the right way to do it...perhaps I should use an "if" statement in the Lua scripts to do this (if pld1=0 then triggerevent("0"), etc...) But, this doesn't work either - in fact, the scripting engine won't even let me "apply" my script. Apparently I have a syntax problem, although I've virtually copied script examples from the online help files.
So, now I'm asking for help: surely there is a way to do this easily. Any pointers?
I have set the GotTV plugin from MyHTPC to send events to girder. The only event I'm interested in is "WTTV.SetChannel". When Girder gets this event, I simply want it to change the STB to that channel by sending the appropriate IR codes through my USB UIRT.
I can make a command that will send any of the digits 0-9 to the box, and they work. I can tell that Girder is receiving the commands, because if I use the "WTTV.vischange" event, Girder sends out whatever I key I "learned".
The setchannel event includes several payloads, but the only one I need is pld1, which will hold the channel number. I can have GotTV send one message w/ the entire channel #, or several messages, each one have a digit of the channel.
My first thought was to set the event string to "WTTV.SetChannel[0]" and the command to transmit IR "0" to the STB. Then duplicate this for the rest of the digits. That way, Got TV could send one message per digit of the channel, and girder would send each digit to the set top box. Apparently, this doesn't work. So, I thought maybe putting [0] at the end of the message wasn't the right way to do it...perhaps I should use an "if" statement in the Lua scripts to do this (if pld1=0 then triggerevent("0"), etc...) But, this doesn't work either - in fact, the scripting engine won't even let me "apply" my script. Apparently I have a syntax problem, although I've virtually copied script examples from the online help files.
So, now I'm asking for help: surely there is a way to do this easily. Any pointers?