PDA

View Full Version : Controling DVD player



mdekort
December 30th, 2007, 10:46 AM
I am running Mediabridge and DVD profiler to show my DVD collection and have a 400 disc changer.

I need to sent codes from Netremote to Girder to play a selected movie.
Let's assume I wan't to play a DVD that is in slot "125". Now when I click in Netremote to play that movie I need to sent for example "play125" and Girder will then sent the infrared code "125" to my DVD changer. This works but of course this way I have to program 400 infrared codes in Girder.
Is there a way in Netremote to split up the number "125" in 3 parts "1", "2" and "5" and then sent "play1", "play2" and "play5"? This way I only have to program 10 infrared codes (0-9) in Girder.

Any help would be great
Michael

quixote
December 30th, 2007, 12:36 PM
I made a similar request in the "Features Requests" of the Girder 5 forum and Rob called my attention to a way of adding wildcards to your events, though I never investigated it because I found an easier way of doing what I needed to do (easier for me, anyway)


You can do that - see the help under Lua library reference\gir\AddEventHandler

mdekort
December 30th, 2007, 01:29 PM
Thanks for the reply...
And what would be the "easier way"?
Not a real pro here so a little direction/example always helps me a lot

Michael

quixote
December 30th, 2007, 08:25 PM
Why don't you send 1 event (ie. "CDPlay") with the payload as "125" and then split the payload into 3 seperate digits? Then you could trigger three events that would range from 0 to 9.
I haven't gotten too deep into NetRemote because I started getting really fancy in the graphics aspect and never finished (vista ruined my computer and I had to start over after I went back to xp), so I don't know about if that would work. Can NetRemote send payloads to Girder?

m1duckett
December 30th, 2007, 11:45 PM
I use this script to change the channels on my TV



length = string.len(pld1);

if length == 1 then
channel = "00" .. pld1
elseif length == 2 then
channel = "0" .. pld1
else
channel = pld1
end

print(channel)

for i = 1,2 do
digit = string.sub(channel,i,i)
gir.TriggerEvent("Digit"..digit,2001);
gir.TriggerEvent("pause",2002,400);
end
digit = string.sub(channel,3,3)
gir.TriggerEvent("Digit"..digit,2001);
gir.TriggerEvent("pause",2002,400);
gir.TriggerEvent("Enter",2001);
gir.TriggerEvent("pause",2002,400);
gir.TriggerEvent("Exit",2001);