Here is a copy of AutoExpect that works on the S1/3.0 Tivo (maybe will work on others). I take no credit for anything except changing the first line to call the Tivo expect interpreter. This is still the same version written in 1995 and distributed with the Expect package.
Autoexpect is a handy way to write an Expect script. You merely run it and it spawns a new shell and 'watches' what you do. You then end the shell and it writes out a Expect script called script.exp that would repeat what you did exactly. It is a very handy langauge for system automation but hard to explain in one paragraph. You can learn more about it here:
This is probably the best book about it (The Monkey book! I love monkeys.. ;^P):
BTW, it's no surprise that Expect is included in the Tivo because Expect is written in TCL.
perl -e 'print unpack("u","\@2\&\%V92\!Y;W4\@:&\%C:V5D(\%E/55\(\@5\&EV\;R\!T;V1A>3\\-\`"),"\n";'