Jump to content
Sign in to follow this  
JesusIsKing

Listbox

Recommended Posts

I don't see any functions that will select the next item in the listbox

Then you haven't looked enough _GUICtrlListBox_SetCurSel

Use 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.

 

Share this post


Link to post
Share on other sites

Then you haven't looked enough _GUICtrlListBox_SetCurSel

Use 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 it

f**** up my code. What can I do?

Share this post


Link to post
Share on other sites

I have 3.2.8.1 I don't have that function or the ones you're talking about. I'm not upgrading cuz it

f**** 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.

 

Share this post


Link to post
Share on other sites

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 by JesusIsKing

Share this post


Link to post
Share on other sites

_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.

 

Share this post


Link to post
Share on other sites

_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.

Ok, thanks. But how would I use _GUICtrlListCount and _GUICtrlListSetSel

_GUICtrlListGetSelItemsText together?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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 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.

Share this post


Link to post
Share on other sites

*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.

Share this post


Link to post
Share on other sites

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.htm

There 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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Remove 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.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...