next up previous contents index
Next: Spectra analysis Up: Basic usage Previous: Configuration files

Remote control

 

Since TV does not support any control structures like loops or branchings an extension was programmed to send commands to TV from any script language. The program that fulfills this is called STV (stands for send tv). For example

i=1;
while `test ${i} != 8`;
  do
    stv "tv> s ${i}.spc";
    i=`expr ${i} + 1`;
  done

started from a shell, loads 7 spectra. STV sends commands only to TV's which are owned by the user running STV and waits for TV to finish the command before returning. Only the last one started TV receives the commands or you must explicitely define a portnumber. This is printed immediately after startup of TV and saved in the file ~/.tv-port. If you want to send commands to TV with portnumber 10000 you enter for example:

i=1;
while `test ${i} != 8`;
  do
    stv "tv> s ${i}.spc" 10000;
    i=`expr ${i} + 1`;
  done

TV shell commands like "%rm -rf ~" sent by STV are ignored.



Andreas Fitzler
7/13/2000