in reply to Re^2: Perl application to read the current browser page
in thread Perl application to read the current browser page

They do exist. vis.

P:\test>type 275606.pl #! perl -slw use strict; use Win32::GuiTest qw[ GetComboText GetComboContents ]; eval{ GetComboText() } or print $@; eval{ GetComboContents() } or print $@; P:\test>275606 Usage: Win32::GuiTest::GetComboText(hwnd, index) at P:\test\275606.pl +line 5. Usage: Win32::GuiTest::GetComboContents(hWnd) at P:\test\275606.pl lin +e 6.

Though the documentation for them seems to be completely absent. Looking through guitest.xs, GetComboText() & GetComboContents() map to a calls to GetTextHelper()

SV* GetComboText(hwnd, index) HWND hwnd; int index CODE: RETVAL = GetTextHelper(hwnd, index, CB_GETLBTEXTLEN, CB_GETLBT +EXT); OUTPUT: RETVAL SV* GetComboText(hwnd, index) HWND hwnd; int index CODE: RETVAL = GetTextHelper(hwnd, index, CB_GETLBTEXTLEN, CB_GETLBT +EXT); OUTPUT: RETVAL

Which in turn gets mapped to calls to SendMessage().

SV* GetTextHelper(HWND hwnd, int index, UINT lenmsg, UINT textmsg) { SV* sv = 0; int len = SendMessage(hwnd, lenmsg, index, 0L); char* text = (char*)safemalloc(len+1); if (text != 0) { SendMessage(hwnd, textmsg, index, (LPARAM)text); sv = newSVpv(text, len); safefree(text); } return sv; }

So, it would be a case of fightling your way through the MSDN documentation relating to ComboBoxes to work out what and how and why, which the module author must have done to bring you the module in the first place. All of which reenforces my opening comments above:

It would not be easy, and it would require either a pretty goood understanding of the Win32 APIs or a lot of research and perseverance.

It all comes down to how desperately you need to do this.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon