rwagnes Posted March 25, 2010 Share Posted March 25, 2010 (edited) $CLVItem = Controllistview("classname=title", "", "syslistview321", "FindItem", "The Item") I am using autoit to navigate a syslistview32 control that is embedded in my product. The machine is a 32 bit os. Count and Select commands work fine. I added classname= because I had seen it in one of the forums and my program crashed due to a memory access violation without it. FindItem always returns 0. Any ideas? Thanks! ******************************************************************************************************************* EDIT: After removing 'classname=', @error is zero and FindItem always returns -1. Any ideas appreciated. Thanks! ******************************************************************************************************************* Edited March 26, 2010 by rwagnes Link to comment Share on other sites More sharing options...
MvGulik Posted March 25, 2010 Share Posted March 25, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
rwagnes Posted March 25, 2010 Author Share Posted March 25, 2010 (edited) $CLVItem = Controllistview("title", "", "syslistview321", "FindItem", "The Item") always returns -1 and crashes my program. Any ideas why? Thanks! My program's log is full of memory access violations.. Edited March 25, 2010 by rwagnes Link to comment Share on other sites More sharing options...
MvGulik Posted March 25, 2010 Share Posted March 25, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
rwagnes Posted March 25, 2010 Author Share Posted March 25, 2010 Except that using $CLVItem = Controllistview("title", "", "syslistview321", "FindItem", "The Item") returns @error=0.. Link to comment Share on other sites More sharing options...
MvGulik Posted March 25, 2010 Share Posted March 25, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
rwagnes Posted March 25, 2010 Author Share Posted March 25, 2010 (edited) With the following code, autoit returns @error=0 and $CLVItem=-1: WinWaitActive("title", "") $count = ControlListView("title", "", "SysListView321", "GetItemCount") MsgBox(0, "FINDITEM 1", "") ControlFocus("title", "", "SysListView321") $CLVItem = ControlListView("title", "", "SysListView321", "FindItem", "Item") MsgBox(0, "FINDITEM 1", @error) if $CLVItem <> -1 Then MsgBox(0, "Exists", $CLVItem) Else MsgBox(0, "Does Not Exist", $CLVItem) EndIf MsgBox(0, "test", $count) For some reason, I can suddenly no longer reproduce the memory issue. I must've changed something, but I still can't get the FindItem to work. Any ideas? Thanks! And thanks MvGulik for your help! Edited March 26, 2010 by rwagnes Link to comment Share on other sites More sharing options...
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