Following is the diff between exec() and system() function
exec()it replaces your currently running program with a different one. If
you want to keep going use system() instead.

Now My problem.......

I want to invoke an application and check the tittle of the default window
of the application.
For invoking application I used system() function. But the problem is after
invoking application next code does not get executed unless we closed the
application. But I want to perform some action on the window after invoking
the same.

Here is my code:


  use Win32::GuiTest qw(FindWindowLike GetWindowText 
        SetForegroundWindow SendKeys);
  
  # invoke 'pce' application ( win32 ::ole->new methods does not help in
that case)
 
   system('C:/from21/AbhraDownload/pce.exe'); 

  # after invoking I want to perform following action

  print " After Invoking application" ;
 $Win32::GuiTest::debug = 0;    # Set to "1" to enable verbose mode
  my $windows = FindWindowLike(0, "^PCE*");
  my $sWindowText = GetWindowText($windows);
  print $sWindowText;
  


My problem is  code after "system('C:/from21/AbhraDownload/pce.exe'); " does
not get executed unless PCE(Application) is closed. It even do not print
'After Invoking application';

How I can Overcome the situation.

Thanking You

Abhra


Abhra Debroy
Prabodhan Exports Pvt. Ltd.(www.prabodhan.com - Join our QA Club!)
Tel: 91-20-5462035,543 1447



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to