Well it depends. Is this script on windows or unix?
I'm thinking unix due to the program name.
Can you do the same thing via the command line?

User~ # echo "\cN\cN\c]]Bc]]Bc]]B\cN\cNc]]B\cN\cZ" | lrp

If not then piping that to them won't work either.

Also if that does work you may save your self some lines/code if you do

print `echo "\cN\cN\c[[Bc[[Bc[[B\cN\cNc[[B\cN\cZ" | lrp`; # may need entire path to 
lrp like /usr/bin/lrp
 or you may have to do the pipe to continue with other commands until you're done 
using lrp.

Hope that helps and am interested in seeing exactly how this is done.

DMuey

> 
> 
> #!/usr/local/bin/perl -w
> 
>     
> # I have a program with a several 
> # screens of menus, which
> # needs me to move the cursor to 
> # make choice, then hit the
> # control plus n key to move 
> # to next screen. I tried to use 
> # this script to automate
> # the process, but it failed.
> # What is the problem here?
> 
>  $down ="\c[[B";
>  $controlN = "\cN";
>  $program_with_menu = "lrp";
> 
>   open(INPUT, "| $program_with_menu");
>   #open(INPUT, "| $program_with_menu > /dev/null");
> 
>   print INPUT $controlN;        
>   print INPUT $controlN; 
>   print INPUT $down; 
>   print INPUT $down; 
>   print INPUT $down; 
>   print INPUT $controlN;
>   print INPUT $controlN;
>   print INPUT $controlN;
>   print INPUT $down; 
>   print INPUT $controlN;
> 
>   print INPUT "\cZ";
> 
>   close(INPUT);
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, and more
> 

Reply via email to