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 line 6. #### SV* GetComboText(hwnd, index) HWND hwnd; int index CODE: RETVAL = GetTextHelper(hwnd, index, CB_GETLBTEXTLEN, CB_GETLBTEXT); OUTPUT: RETVAL SV* GetComboText(hwnd, index) HWND hwnd; int index CODE: RETVAL = GetTextHelper(hwnd, index, CB_GETLBTEXTLEN, CB_GETLBTEXT); OUTPUT: RETVAL #### 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; }