Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 32

Thread: Remote Control Thru Serial Port

  1. #16
    Join Date
    Sep 2001
    Posts
    889
    my corrections shoorter.. nyah nyah nyah nyah nyah nyah..
    of course.. it was my faulty logic to begin with.. .

  2. #17
    Join Date
    Jan 2002
    Location
    New York
    Posts
    2,406
    Ok.. How about this ?

    ------------

    #!/bin/bash
    #channel changer script - usage: cc <channel>

    mI=$1

    until [ "$mI" -eq 0 ]; do

    lM=$(($mI % 10))
    mI=$(($mI / 10))
    mN=$((mI % 10))
    mI=$((mI / 10))
    fN=$(($mI % 10))
    mI=(($mI % 10))

    SendKey $fN
    SendKey $mN
    SendKey $lM

    done

    echo "Changing Channel to '$1' "

    SendKey enter > /dev/null


    ----------------

    Can someone help with the leading zero...

    Also, how can I stop the loop.. I can't figger why it's not killing at the first mI=0 ?

    HALP...

    JJ
    Last edited by JJBliss; 01-23-2002 at 09:05 PM.

  3. #18
    Join Date
    Sep 2001
    Posts
    889
    or even better.. it actually produces the originally stated requirement..

    #!/bin/bash
    #channel changer script - usage: cc <channel>
    cS=" "
    mI=$1

    until [ $mI -eq 0 ]; do
    lV=$(($mI % 10))
    mO=$lV$cS$mO
    mI=$(($mI / 10))
    done

    echo "Changing Channel to '$1' "

    SendKey $mO enter > /dev/null

  4. #19
    Join Date
    Jan 2002
    Location
    New York
    Posts
    2,406
    DAMN !!!!!!!!!!!!!!

    Ya know !!!!!!!!!!!!!!!!!!!!!!!!!!!!

    OK.. That was a fun [sic] exercise...

    (and I wanted you guys to think I was cool... <sniff> <sniff> )

    DAMN.....

    Well BubbaJ.. Yours worked (duh..)

    But at leas I'm proud that I got that far (along the same lines)

    So tell me.. What'd I do wrong (for learning reasons and all that)

    JJ

  5. #20
    Join Date
    Jan 2002
    Location
    New York
    Posts
    2,406

    AARGH !

    AARRRRRGH !!

    errr... Would completing the do loop have helped ?

    ___________________

    #!/bin/bash
    #channel changer script - usage: cc <channel>

    mI=$1

    until [ "$mI" -eq 0 ]; do

    lM=$(($mI % 10))
    mI=$(($mI / 10))
    mN=$((mI % 10))
    mI=$((mI / 10))
    fN=$(($mI % 10))
    mI=(($mI % 10))

    done


    SendKey $fN
    SendKey $mN
    SendKey $lM



    echo "Changing Channel to '$1' "

    SendKey enter > /dev/null

    ---------------------------------------

    Sheesh.......

    Just curious.. I'd try it myself but BOTH tuners are chuggin' along recording stuff...

  6. #21
    Join Date
    Jan 2002
    Location
    TX
    Posts
    31
    BubbaJ, I bow to your knowledge. You probably whipped that up in a few minutes and my piddly script probably took me at least 15 (and with help!)
    -chinhster

  7. #22
    Join Date
    Sep 2001
    Posts
    889
    the first pseudo script only took a few seconds..

    the first real script (obviously) went untested and took about 10 minutes (I had to look up how to handle input arguments (it isn't argv, math, and loops... (bash script is NOT an everyday language for me))

    the corrected script took about 10 minutes trying to figure out how to do it with a loop, and about 1 minute doing it without + 1 minute to test it.

    The final script just sorta popped into my head.. it took about 1 minute to write and test..

  8. #23
    Join Date
    Nov 2001
    Posts
    730
    Slow down Bubba, yer head will pop if it gets much bigger.

  9. #24
    Join Date
    Sep 2001
    Posts
    889
    It's actually true even .. I had given up on making it smaller, then boom.. it hit me..

    I don't have a swelled head.. though all these people sain' I's Smurt mekes us feil pirty guud..

    :Z


  10. #25
    Join Date
    Sep 2001
    Posts
    134
    Ok -- I'll ask --

    So save the code as cc.tcl and put in /var/hack
    execute by cc XXX

    Will it continue to record the channel that gets changed to?

  11. #26
    Join Date
    Sep 2001
    Posts
    889
    no.. it isn't tcl.. save it as cc, download tridges code, which is refernced in this thread

    make both of them executable then run as indicated.


    it will act exactly as if you had pressed the keys on the remote.

    dt will let you change channels without the tivo knowing

  12. #27
    Join Date
    Jan 2002
    Posts
    29
    The numbers are obvious and "SendKey guide" pulls up the guide, but does anyone know anything else? Does anyone have a list of the commands that work?

  13. #28
    Join Date
    Jan 2002
    Posts
    29
    Here are a few more that I found:
    SendKey clear
    SendKey up
    SendKey down
    SendKey left
    SendKey right
    SendKey select
    SendKey display
    SendKey tivo
    SendKey livetv
    SendKey directv
    SendKey guide

  14. #29
    Join Date
    Jan 2002
    Posts
    29
    Duh, found sendkey.tcl. I made a complete list of sendkey buttons (as if anyone cares). Here it is.

  15. #30
    Join Date
    Jan 2002
    Posts
    241
    I wonder if a window GUI interface can ben written to do the sendkey command......

    Visual Basic maybe??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •