I've actually used the API calls from VB.  I hadn't seen the Win32::Setupsup
until Toby Everett pointed me to it.  I haven't tried it with 5.6, yet.  Is
Rational making the runtime for VTest 6 freeware, or am I presupposing a
licensing/availability issue where there isn't one?

-----Original Message-----
From: Garrett Goebel [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 13, 2000 3:23 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [perl-win32-gui] Anyone tried using Win32::GUI as MS Visual T
est replacement?



Sorry for the HTML... here goes again... 

From: Hicks, Matthew [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] 
> 
> In Windows NT, sometimes there is no scripting alternative to 
> clicking the mouse in dialog boxes. In these cases I've 
> scripted in MS Visual Test (and then called the MSVT script 
> from Perl). I'd rather just do it all in Perl. 
[...] 
> I believe the two API calls of interest are: FindWindowEx and 
> SendNotifyMessage. 

I doubt that that is all you will need, but as an exercise... MSDN says: 

Library: User32.DLL 

HWND FindWindowEx( 
  HWND hwndParent,      // handle to parent window 
  HWND hwndChildAfter,  // handle to child window 
  LPCTSTR lpszClass,    // class name 
  LPCTSTR lpszWindow    // window name 
); 
BOOL SendNotifyMessage( 
  HWND hWnd,      // handle to window 
  UINT Msg,       // message 
  WPARAM wParam,  // first message parameter 
  LPARAM lParam   // second message parameter 
); 


Using Win32::API, this would be: 
use Win32::API; 
$FindWindowEx = new Win32::API('User32', 
                               'FindWindowEx', 
                               [qw(N N P P)], 
                               'N'); 
$SendNotifyMessage = new Win32::API('User32', 
                                    'SendNotifyMessage', 
                                    [qw(N I N N)], 
                                    'I'); 
my $hwnd = $FindWindowEx->Call($parent_hwnd, 
                               undef, 
                               "The Class", 
                               "The Caption"); 


About a year or so ago, I looked into using Win32::GUI for automated GUI
testing. I.e., replacing Visual Test. I was unable to get the functionality
out of Win32::GUI that I needed within the time I'd allotted... But that
isn't to say that Win32::GUI isn't up to the task. My limited knowledge of
the Win32 API and Perl were as much an issue as the maturing status of
Win32::GUI.

Just yesterday, I took notice of Rational Visual Test 6.01's vtctrl.h C
header file and vtctrl.bas Visual Basic script for accessing the Visual Test
API from the vtest60.dll. I'm thinking if I find the time this weekend that
I might try to wrap them for Perl. If you don't hear from me Monday, assume
I'm not going to do it. I thought it'd be nice to start with the Visual Test
functionality, and allow for a gradual rewrite into Perl...

Garrett 

Reply via email to