Psibernetic Posted January 10, 2007 Share Posted January 10, 2007 as far as Ikno, using the GuiGetMsg() does not return a value when any part of a ListView box is clicked, or a ListViewItem... My problem is that I need my program when a user clicks one of the items it copies the text and sends it to an inputbox... as far as getting the text and sending it..I have no problem...but how do I detect when a user clicks an item!!!? [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 10, 2007 Moderators Share Posted January 10, 2007 GUIRegisterMsg() Also do a search for "DoubleClick" to see how it's used. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Psibernetic Posted January 10, 2007 Author Share Posted January 10, 2007 Wow...I am sorry..but I have never messed with API's or DLL structs....so I really understood not much of that I wasnt sure wat u meant by look up dblclik so I used the help in autoit...lost [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
Psibernetic Posted January 10, 2007 Author Share Posted January 10, 2007 Since Smoke n is offline, could someone else please help clarify the function he pointed out or provide an alternative...much appreciated [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 10, 2007 Moderators Share Posted January 10, 2007 Wow...I am sorry..but I have never messed with API's or DLL structs....so I really understood not much of that I wasnt sure wat u meant by look up dblclik so I used the help in autoit...lostI thought I was pretty straight forward:http://www.autoitscript.com/forum/index.ph...ite=DoubleClick Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
frodo Posted February 26, 2007 Share Posted February 26, 2007 (edited) as far as Ikno, using the GuiGetMsg() does not return a value when any part of a ListView box is clicked, or a ListViewItem... My problem is that I need my program when a user clicks one of the items it copies the text and sends it to an inputbox... as far as getting the text and sending it..I have no problem...but how do I detect when a user clicks an item!!!? Okay, i have an example that i use for single clicks that you might find helpful. I use it for drive details ina listview. Its gets reused quite a lot. Clicking on an item in the listview, pastes the info to labels elsewhere on the form. Should be easy to modify to send data to other controls, just change the references in the GUICtrlSetData lines for the example: $TabPanel_0_ListView - a ListView control that just happens to be on a tab. It has 5 columns. $TabPanel_0_DriveLabel_2 - a label that displays the contents of the first column. $TabPanel_0_DriveFileSystem_2 = a label that displays the contents of the last column.Make sure you have: #Include <GuiListView.au3> and #include <GuiConstants.au3> at the top of your code too CODE ;This locks the mouse click to the ListView control Case $msg = $GUI_EVENT_PRIMARYDOWN And $TabPanel_0_ListView ;Gets the index of the currently selected listview item. $CurrentSelection = _GUICtrlListViewGetHotItem($TabPanel_0_ListView) ;Creates an array of the currently selected listview item's column contenst (in my case thats 5 columns of data) $CurrentSelectionArray = _GUICtrlListViewGetItemTextArray($TabPanel_0_ListView, $CurrentSelection) ;Stops the GUI from crashing if you select a blank part of the ListView control, always handy If @error Then ContinueCase ;Sets a label that displays the contents of the first column. GUICtrlSetData($TabPanel_0_DriveLabel_2, $CurrentSelectionArray[1]) ;Sets a label that displays the contents of the first column. GUICtrlSetData($TabPanel_0_DriveFileSystem_2, $CurrentSelectionArray[5]) Edited February 27, 2007 by frodo 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