autobelt Posted July 29, 2015 Posted July 29, 2015 If $aWinList[0][0] > 0 And $aWinList[0][0] < 2 Then ;MsgBox($MB_SYSTEMMODAL, "", "Window HWND: " & $aWinList[1][1]) Local $hControl1 = ControlGetHandle($aWinList[1][1], "", "[CLASS:SysListView32; INSTANCE:1]") Local $hControl2 = ControlGetHandle($aWinList[1][1], "", 59664) ;MsgBox($MB_SYSTEMMODAL, "", "Door List HWND: " & $hControl1) ;MsgBox($MB_SYSTEMMODAL, "", "Status List HWND: " & $hControl2) Local $numItems = _GUICtrlListView_GetItemCount($hControl1) MsgBox($MB_SYSTEMMODAL, "", $numItems) _GUICtrlListView_ClickItem($hControl1, 0, "left", False) Local $finOut[$numItems] For $i = 0 To $numItems - 1 Sleep(1000) $sText =_GUICtrlListView_GetItemText($hControl1, $i) & " || " & _GUICtrlListView_GetItemText($hControl2, 2, 2) _ArrayInsert($finOut, $i, $sText) Send("{DOWN}") Next _ArrayDisplay($finOut) EndIfSeems pretty simple. The bolded part is what crashes the window. I have to get the hControl1's HWND differently because there is a treeview with the same ID for some reason. I'm guessing this is what is causing the issue somehow?
JohnOne Posted July 30, 2015 Posted July 30, 2015 Cannot see any bold part. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
autobelt Posted July 30, 2015 Author Posted July 30, 2015 Apologies..._GUICtrlListView_GetItemText($hControl1, $i)Which is when I'm looping through the items in the listview and appending the text to the text of another listview's corresponding item.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now