Sending Message to AutoIt for a VB6 Listbox and Finding String? -


2 went through forums , other related question, did not help. question related sending message controls using autoit. in following code trying find index of text intended search("l20"). application written in vb , same sendmessage through vb works. believe below sendmessage has issue. please me finding issue.

$windowname = "form1" $windowtext = "" winwait("[class:thunderrt6formdc]") local $hlistbox1 = controlgethandle("[class:thunderrt6formdc]", "", "thunderrt6listbox1") local $hlistbox2 = controlgethandle("[class:thunderrt6formdc]", "", "thunderrt6listbox2") winactivate( $windowname, $windowtext ) controlclick("[class:thunderrt6formdc]", "", "thunderrt6listbox2") msgbox(0, "controlgethandle example", $hlistbox1 & " - " & $lb_findstring & " - " & -1 & " - " & "l20") msgbox(0, "controlgethandle example", $hlistbox2 & " - " & $lb_findstring & " - " & -1 & " - " & "l20") local $stext = "l20" local $obj1 = dllcall("user32.dll", "int", "sendmessagea", "hwnd", $hlistbox1, "uint",     $lb_findstring, "wparam", -1, "wstr", $stext) local $obj2 = dllcall("user32.dll", "int", "sendmessagea", "hwnd", $hlistbox2, "uint", $lb_findstring, "wparam", -1, "wstr", $stext) ;local $obj1 = _sendmessagea($hlistbox1, $lb_findstring, -1, "l20") ;local $obj2 = _sendmessagea($hlistbox2, $lb_findstring, -1, "l20") msgbox(0, "controlgethandle example", "the control handle of thunderrt6listbox1 is: " & $obj1 & $obj2) 

the following vb6 version works in vb6 application

if findexactmatch     getlistboxindex = sendmessage(hwnd, lb_findstringexact, startindex, searchkey) else     getlistboxindex = sendmessage(hwnd, lb_findstring, startindex, searchkey) end if 


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -