BrainFart Posted January 23, 2008 Posted January 23, 2008 Hi there, I am experimenting right now with the OnEvent mode in AutoIT... What I did is to register a function to a few hundred ListViewItems. I'm not sure if it's good practice, but it seems to work very well so far. Anyways...all this to say that when I click on any ListViewItem, the function is called, and I can get the clicked ListViewItem control id from @GUI_ctrlID. My question is this: is there any way, from that @GUI_ctrlID, to "find" what is it's ListView - or should I say "parent" - control ID? I am looking for something like _GuiCtrlListViewItem_GetListView($i_ListViewItem_ctrlID) - but I guess I'll have to deal with Dll stuff beyond my level of comprehension ;-) Thanks for any help!
martin Posted January 23, 2008 Posted January 23, 2008 (edited) Hi there, I am experimenting right now with the OnEvent mode in AutoIT... What I did is to register a function to a few hundred ListViewItems. I'm not sure if it's good practice, but it seems to work very well so far. Anyways...all this to say that when I click on any ListViewItem, the function is called, and I can get the clicked ListViewItem control id from @GUI_ctrlID. My question is this: is there any way, from that @GUI_ctrlID, to "find" what is it's ListView - or should I say "parent" - control ID? I am looking for something like _GuiCtrlListViewItem_GetListView($i_ListViewItem_ctrlID) - but I guess I'll have to deal with Dll stuff beyond my level of comprehension ;-) Thanks for any help! It sounds like there should be a neat answer to this but unfortunately I don't know it, so although someone is bound to give it in the next 20 seconds, you could just use GUIGetCursorInfo as soon as the click is detected, then the 5th element of the Returned variable will give you the control ID. . . $IsIt = GUIGetCursorInfo($Gui) if not @error then if $IsIt[4] = $ListView1 then .... endif endif Edited January 23, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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