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

Re: Help for Launch Application

Expand Messages
  • Dennis K. Paulsen
    Also, you ll want to use GetWindowText instead of GetWindowsText, as the latter doesn t exist. ... wrong
    Message 1 of 3 , May 4, 2005
    • 0 Attachment
      Also, you'll want to use GetWindowText instead of GetWindowsText, as
      the latter doesn't exist.


      --- In perlguitest@yahoogroups.com, "pkaluski" <pkaluski@p...> wrote:
      > Hi,
      > SetFocus expects window handle not a window caption
      > -Piotr
      >
      >
      > --- In perlguitest@yahoogroups.com, "aparna73"
      <aparnashastry@h...> wrote:
      > > Hi all,
      > > I am trying to launch an QTP from the perl code, using win32-
      > > GuiTest. It's launches but not focusing? Please tell what's
      wrong
      > > with my code.
      > >
      > > use Win32::GuiTest qw(:ALL);
      > > system ("C:\\Program Files\\Mercury Interactive\\QuickTest
      > > Professional\\bin\\QtPro.exe");
      > >
      > > my @windows = FindWindowLike (0,"^QuickTest Professional- Add-in
      > > Manager");
      > > $win32::GuiTest::debug = 1;
      > > print @windows;
      > > for(@windows){
      > > $title = GetWindowsText($_);
      > > if($title = "QuickTest Professional - Add-in Manager"){
      > > SetForegroundWindow($_);
      > > Win32::GuiTest::SetFocus("^QuickTest Professional - Add-in
      > > Manager");
      > > SendKeys("{Enter}");
      > > }
      > > }
    Your message has been successfully submitted and would be delivered to recipients shortly.