From: Jonathan E. <Jon...@ni...> - 2003-04-08 21:42:15
|
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 |