JesusIsKing Posted December 16, 2007 Share Posted December 16, 2007 How do I scroll in a listbox? Is there a command that will allow you to go to the next item in a listbox until there are none left? Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 ? Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 GuiListBox Management in the help SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 GuiListBox Management in the helpI don't see any functions that will select the next item in the listbox Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 I don't see any functions that will select the next item in the listboxThen you haven't looked enough _GUICtrlListBox_SetCurSelUse a little imagination you'll figure it out. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 Then you haven't looked enough _GUICtrlListBox_SetCurSelUse a little imagination you'll figure it out.I have 3.2.8.1 I don't have that function or the ones you're talking about. I'm not upgrading cuz itf**** up my code. What can I do? Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 I have 3.2.8.1 I don't have that function or the ones you're talking about. I'm not upgrading cuz itf**** up my code. What can I do?I doubt that it f***** up your code, just takes a little time to convert.Being I don't plan to go backwards I believe the function equivalent is _GUICtrlListSelectIndex SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 (edited) I've been trying to solve this problem once and for all and have never been able to do so. My problem:I made a script that is a buddylist for an application. It inputs a buddy name in a window in the external application called Full Tilt and then the Full Tilt app shows in a listbox what tables that buddy is sitting at. My problem is I want to retrieve every one of those tables in the listbox and then store them all in an array. The listbox is single select. The part I can do is input the buddy name in the window, the part I can't do is retrieve the listbox items and store them in an array or variable. How do I do this, help would be greatly appreciated. Any other questions about my problem please ask!BTW: I'm using version 3.2.8.1 Edited December 16, 2007 by JesusIsKing Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 _GUICtrlListCount _GUICtrlListGetText or _GUICtrlListCount _GUICtrlListSetSel _GUICtrlListGetSelItemsText No sense in starting another thread when you don't like the answers your getting with the information you provided. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 _GUICtrlListCount_GUICtrlListGetTextor_GUICtrlListCount_GUICtrlListSetSel_GUICtrlListGetSelItemsTextNo sense in starting another thread when you don't like the answers your getting with the information you provided.Ok, thanks. But how would I use _GUICtrlListCount and _GUICtrlListSetSel_GUICtrlListGetSelItemsText together? Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 Topics merged Look in the help. for loop SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 Topics merged Look in the help. for loop Ok, I used the For To Loop and it looks like this so far: $i_count = _GUICtrlListCount($Listbox) $u_count = $i_count - 1 For $a = 0 To $u_count _GUICtrlListGetText($Listbox, $u_count) Now how do I store it in an array or variable. Does my code have any errors or needs improvement? Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 any suggestions? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 16, 2007 Moderators Share Posted December 16, 2007 (edited) any suggestions? I'm pretty sure I've warned you about bumping in such short times... you shouldn't bump your previous thread/post within a 24 hour period. Waiting only 30 minutes is not a fair amount of time for others seeking help to have to watch their threads be moved to the bottom because of your disrespect... This isn't a drive through. Edited December 16, 2007 by SmOke_N 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...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 *have my crystal ball......am Channelling Fossil Rock and he provides the answer of*RTFM........ or take the advice and answers provided above and try them.Do you not think I've already taken their advice. I'm asking a new question which is how to store the data that should be returned by my code in an array or variable. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 16, 2007 Moderators Share Posted December 16, 2007 Do you not think I've already taken their advice. I'm asking a new question which is how to store the data that should be returned by my code in an array or variable.http://www.autoitscript.com/autoit3/docs/i...g_variables.htmThere are examples as well. You'll need to study them, and look for other examples in the help file to better understand them. 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...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 Instead of storing it in an array which I don't know what the use of one is in this situation, how would I take all the list items that I "so called" retrieved from the listbox and put them into my listview Link to comment Share on other sites More sharing options...
GaryFrost Posted December 16, 2007 Share Posted December 16, 2007 Instead of storing it in an array which I don't know what the use of one is in this situation, how would I take all the list items that I "so called" retrieved from the listbox and put them into my listviewYou know how to get the data from a listbox, now shouldn't be that hard to add to the listview if you know the correct function call which can be found in the help. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
JesusIsKing Posted December 16, 2007 Author Share Posted December 16, 2007 You know how to get the data from a listbox, now shouldn't be that hard to add to the listview if you know the correct function call which can be found in the help. Yes but it doesn't do anything. I tried and it doesn't add the items. Am I coding this right? Please help. $i_count = _GUICtrlListCount($Listbox) $u_count = $i_count - 1 For $a = 0 To $u_count $ret_t = _GUICtrlListGetText($Listbox, $u_count) Next GUICtrlCreateListViewItem($ret_t, $sListview) Next Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 16, 2007 Moderators Share Posted December 16, 2007 Yes but it doesn't do anything. I tried and it doesn't add the items. Am I coding this right? Please help. $i_count = _GUICtrlListCount($Listbox) $u_count = $i_count - 1 For $a = 0 To $u_count $ret_t = _GUICtrlListGetText($Listbox, $u_count) Next GUICtrlCreateListViewItem($ret_t, $sListview) NextRemove your GUICtrlCreateListViewItem and replace _GUICtrlListGetText() with: GUICtrlCreateListViewItem(_GUICtrlListGetText($Listbox, $u_count), $sListview) But I'm sure you're going to want to do something with what's in the listview afterwards, so on to the "next" question, "How do I put what is selected in the ListView into a variable for use"... Now if you seriously ask that question... You need to stick your nose in the Help file until you can achieve some of the medial things that the help file (if actually read and comprehended) would provide for you. 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...
Recommended Posts