Loading ...
Sorry, an error occurred while loading the content.

172RE: [perlguitest] Automating Console Application

Expand Messages
  • Chris Hilton
    Apr 4, 2003
      You might also try looking at the IPC::Open2 and IPC::Open3 modules. I haven't used them, but they seem to do something similar to what you want.
      Chris Hilton
      -----Original Message-----
      From: brad_e1 [mailto:brad_e1@...]
      Sent: Thursday, 03 April, 2003 21:42
      To: perlguitest@yahoogroups.com
      Subject: [perlguitest] Automating Console Application

      Hi All,

      I have an interactive console application that I am trying to
      automate. I want to send key strokes to an application that I spawn
      using the system call and at the same time capture what the program
      dumps to stdout. I am working in windows XP and I cannot seem to get
      it to work. I tried redirecting the output of my application to a
      file but it doesn't seem to work because the output file output.txt
      is always empty.

      Can anybody tell me what I am doing wrong and if there is a better
      way to do this or provide me an example. I would appreciate any
      assistance that anyone can offer.

      Here is a example of what I am doing:

      use Win32::GuiTest qw/SendKeys FindWindowLike GetWindowText/;

      $Path = "C:/test";

      system("start $Path/myexe.exe -i config.ini >> output.txt");

      # Allow program time to start up

      my @windows = FindWindowLike(0, "myexe.exe", "");


      To unsubscribe from this group, send an email to:

      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
    • Show all 6 messages in this topic