[perl-win32-gui-users] obtaining contents of another app's ListBox control

2003-04-08 Thread Jonathan Epstein
Hi,

I need to grab some data from a commercial third-party application's listbox.

Assuming that I know the window handle (later on I'll find it with FindWindow, 
but a single fixed window will work fine for now), how do I do this?

I've tried stuff like:

use Win32::GUI;

my $lb = 0x002a01b6;


my $LB_GETTEXT = 0x0189;

$index = 0;
$buffer = "";
Win32::GUI::SendMessage($lb,$LB_GETTEXT, $index, \$buffer);
print $buffer;


and...

use Win32::API;
use strict;

my $LB_GETTEXT = 0x0189;
my $buffer;

my $SendMsg = new Win32::API("user32", "SendMessage", "NNNP", "N");

my $hwnd = 0x002a01b6;
my $index = 0;
$SendMsg->Call($hwnd, $LB_GETTEXT, $index, $buffer );
print $buffer;


and I've seen references to: GUI::GetDlgItem($handle,0)

but I haven't figured out the right incantation yet.

Thanks in advance for any advice.

Jonathan





Re: [perl-win32-gui-users] Writing ActiveX modules in perl?

2007-01-08 Thread Jonathan Epstein
ActiveState provides commercial tools to do this, PerlCOM and PerlCtrl.  And 
here are some Perl links:
  http://ftp.activestate.com/unsupported/PDK/release.htm
  http://www.mkssoftware.com/docs/man5/perlcom.5.asp
  http://burningbird.net/devaspcomp/bonus/perl.htm
  http://www.foo.be/docs/tpj/issues/vol3_3/tpj0303-0008.html
  http://www.windowsitpro.com/Article/ArticleID/3928/3928.html

I haven't used these.  But I have used corresponding (free) tools in Python ... 
for some reason this is one of the few areas (IMHO) where Python's tools are 
more advanced than Perl's.

Here's a link to a great book which includes a lot of info on this subject.  
It's even worth reading if you plan to do this in Perl.
  http://www.oreilly.com/catalog/pythonwin32/

HTH,

Jonathan


At 11:31 AM 1/8/2007, Steve Loughran wrote:
>Slightly off-topic, but is it possible to write standalone (dll or ocx) 
>ActiveX modules in win32 perl? (And I dont mean show them in perl using 
>AXWindow). Or should I just stick with VB6 for that?
>
>Any helpful hints or tips would be gratefully received, especially from 
>anyone who has actually done this (or still doing it)
>
>Steve