View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 1 post ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu May 13, 2004 1:00 am 
Offline
Joined: Thu Feb 12, 2004 2:54 pm
Posts: 392
Location: Beaumont, CA
I can switch to a command line (or ssh) and run
/usr/local/bin/change_channel.csh 248
(or any channel)
and it will change to the right channel.

however I guess I don't know the right script to put in the mythtv "external channel change command" box.
I have
/usr/local/bin/change_channel.csh
also tried with %1 at end, %2 at end $1, etc.
Probably need to find out what exactly to put there.
Here is my change_channel.csh file:
#!/bin/csh
echo "changing to $1"
/usr/local/bin/channel.pl $1 &


Here is my channel.pl file:
#!/usr/bin/perl
#
## make sure to set this string to
## the corresponding remote in /etc/lircd.conf
$remote_name = "JVC_RAW";

sub change_channel {
my($channel_digit) = @_;
system ("remote_irsend SEND_ONCE $remote_name $channel_digit");
sleep 1;
}

$channel=$ARGV[0];
sleep 1;
if (length($channel) > 2) {
change_channel(substr($channel,0,1));
change_channel(substr($channel,1,1));
change_channel(substr($channel,2,1));
} elsif (length($channel) > 1) {
change_channel(substr($channel,0,1));
change_channel(substr($channel,1,1));
} else {
change_channel(substr($channel,0,1));
}
system ("remote_irsend SEND_ONCE $remote_name SELECT");


Thanks in advance...


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu