manofman Posted December 8, 2007 Share Posted December 8, 2007 (edited) Hi i try to put the last item text of a listview in a variable is are my code WinWaitActive("My Prog Name") ControlListView ( "My Prog Name", "", 771, "SelectAll") $Lget = ControlListView ( "My Prog Name", "", 771, "GetItemCount") ControlListView ( "My Prog Name", "", 771, "SelectClear") $Lfind = ControlListView ( "My Prog Name", "", 771, "GetText", $Lget) oh and by the way i know already for title i have just put my prog name as a example and my code did not work and the code is on a function Any suggestion please ? Thank you Best regards Edited December 8, 2007 by manofman Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 8, 2007 Share Posted December 8, 2007 Hi i try to put the last item text of a listview in a variable is are my code WinWaitActive("My Prog Name") ControlListView ( "My Prog Name", "", 771, "SelectAll") $Lget = ControlListView ( "My Prog Name", "", 771, "GetItemCount") ControlListView ( "My Prog Name", "", 771, "SelectClear") $Lfind = ControlListView ( "My Prog Name", "", 771, "GetText", $Lget) oh and by the way i know already for title i have just put my prog name as a example and my code did not work and the code is on a function Any suggestion please ? Thank you Best regards I'm not in Windows land right now, so I can't test easily (could bring up WINE but I'm lazy). The index to ListView items is zero-based, I believe. That means you need to use $Lget - 1 for the last item. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 (edited) I'm not in Windows land right now, so I can't test easily (could bring up WINE but I'm lazy). The index to ListView items is zero-based, I believe. That means you need to use $Lget - 1 for the last item. ok thx i wll test itEDIT: seems that does not work always blank with my msg box to see if its work Edited December 8, 2007 by manofman Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 (edited) Any other idea ??? here my new code : WinWaitActive("My Prog Name") ControlListView ( "My Prog Name", "", 771, "SelectAll") $Lget = ControlListView ( "My Prog Name", "", 771, "GetItemCount") $findit = $Lget - 1 ControlListView ( "My Prog Name", "", 771, "SelectClear") $Lfind = ControlListView ( "My Prog Name", "", 771, "GetText", $Lget) all variable are set global Edited December 8, 2007 by manofman Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 8, 2007 Share Posted December 8, 2007 Any other idea ???I have AutoIt loaded under WINE here, and it's not a current version. I think you need to look at the newer UDF functions under _GuiCtrlListView_* in the help file for 3.2.10.0. Sorry I can't follow you there at the moment, but I think that's where you'll find the answer. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 I have AutoIt loaded under WINE here, and it's not a current version. I think you need to look at the newer UDF functions under _GuiCtrlListView_* in the help file for 3.2.10.0. Sorry I can't follow you there at the moment, but I think that's where you'll find the answer. ok thank you Link to comment Share on other sites More sharing options...
Valuater Posted December 8, 2007 Share Posted December 8, 2007 Not enough code for me...but $Item_Count = ControlListView ( "My Prog Name", "", 771, "GetItemCount") $Lfind = ControlListView ( "My Prog Name", "", 771, "GetText", $Item_Count) per help ... "GetText", Item, SubItem Returns the text of a given item/subitem. Your use just doesn't make sense to me 8) Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 whats wrong with this $Lget = _GUICtrlListViewGetItemCount(771) Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 (edited) Not enough code for me...but $Item_Count = ControlListView ( "My Prog Name", "", 771, "GetItemCount") $Lfind = ControlListView ( "My Prog Name", "", 771, "GetText", $Item_Count)per help ... "GetText", Item, SubItem Returns the text of a given item/subitem. Your use just doesn't make sense to me8)ok thank you i will try with thatand sorry did not sleep so i have i make some error because of that lol Edited December 8, 2007 by manofman Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 but to explain better if i have example 10 item on a list box and i want to get the 10th item text i need to use ControlListView ( "My Prog Name", "", 771, "GetText", the 10th number of the list box) Or is something else ??? Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 but to explain better if i have example 10 item on a list box and i want to get the 10th item texti need to use ControlListView ( "My Prog Name", "", 771, "GetText", the 10th number of the list box)Or is something else ???Because for now its show me always 0 on my msgbox its realy strange Link to comment Share on other sites More sharing options...
manofman Posted December 8, 2007 Author Share Posted December 8, 2007 other question does listview when you look with windows info the class are always listview32 ??? or its can be something else like FCCHH for example 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