The Code
This script
registers itself with the event switcher to receive a callback for
events 0 through 74 listed in
Inc.tcl. When it gets the call, it prints the
event type it received, as well as all the data that came along with
it.
#!/tvbin/tivosh
proc event_callback { type subtype } {
global EventData
binary scan $EventData I* idata
puts "[format "%02d" $type] [format "%02d" $subtype] : $idata"
}
for {set x 0} {$x <= 74} {incr x} {
event register $x event_callback
}
set StillWaiting 1
vwait StillWaiting
Save the code as
events.tcl in your TiVo's
/var/hack/bin directory, and make it executable:
bash-2.02# chmod 755 /var/hack/bin/events.tcl