#!/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