LerN

Listview problem

16 posts in this topic

#1 ·  Posted (edited)

First of all hi everyone (:
I have a problem about the listview item
For ex: i have a listview item contains about 500 names ...
and i have an input and an button 
So what i wanted to do is to search for an name if it found the name, the name will be selected in the listview and if i don't want this name and i clicked on search again it searches for the next name ... 
can someone help please ?
btw i got some way works but it just searches for one name for ex : there 5 names called asd , it just searches for one
$Search = _GUICtrlListView_FindText ( $ListView1, Guictrlread($InputSearch))
_GUICtrlListView_SetItemSelected($ListView1,$Search)
_GUICtrlListView_EnsureVisible($ListView1, $Search)

Edited by LerN

Share this post


Link to post
Share on other sites



#2 ·  Posted

Used this:_GUICtrlListView_GetItemTextArray

to create this:

Func _GUICtrlListView_GetItemTextArray_2d($hWnd)
    Local $i = _GUICtrlListView_GetItemCount($hWnd)
    If $i <= 0 Then Return SetError($LV_ERR, $LV_ERR, $i)
    Local $sItem = StringSplit(_GUICtrlListView_GetItemTextString($hWnd,0),"|",2)
    Local $aItems[$i][UBound($sItem)]
    For $j = 0 To UBound($sItem)-1
        $aItems[0][$j] = $sItem[$j]
    Next
    For $j = 1 To UBound($aItems)-1
        $sItem = StringSplit(_GUICtrlListView_GetItemTextString($hWnd,$j),"|",2)
        For $l = 0 To UBound($sItem)-1
            $aItems[$j][$l]=$sItem[$l]
        Next
    Next
    Return $aItems
EndFunc   ;==>_GUICtrlListView_GetItemTextArray

returns a 2d array of all the items...you can then loop through that, and get all the stuff you need
 


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

#3 ·  Posted

Could u explain more please ?

Share this post


Link to post
Share on other sites

#4 ·  Posted

Guys someone help me please

Share this post


Link to post
Share on other sites

#5 ·  Posted

:/

Share this post


Link to post
Share on other sites

#7 ·  Posted

Just now, Jos said:

Meaning? 

I still need help

Share this post


Link to post
Share on other sites

#9 ·  Posted

No but that's for school project and i must finish that today and i get tired from trying and trying :(

Share this post


Link to post
Share on other sites

#10 ·  Posted

Well then it is time to give you a reality check: This is a forum where people help other people as a hobby!
You might have tried a lot but have nothing to show for so either post something that shows you are putting in effort or be patient and follow our forumrules NOT to bump threads within 24 hours.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Just now, Jos said:

This is a forum where people help other people as a hobby!

I don't see that actually
and i already searched alot but i didn't find what iam looking for here

Edited by LerN

Share this post


Link to post
Share on other sites

#12 ·  Posted

Just now, LerN said:

I don't see that actuall

I hope you are joking ... if not let me know and I will ban your sad ass.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Just now, Jos said:

I hope you are joking ... if not let me know and I will ban your sad ass.

Jos

Iam sorry and i was joking :/
are u going to help ?

Edited by LerN

Share this post


Link to post
Share on other sites

#14 ·  Posted

9 minutes ago, LerN said:

are u going to help ?

You can only be helped when you let yourself be helped. Looking at your history in this forum I can only see others putting in effort for you, which is not going to work for you in the long run. So, as stated earlier, show some initiative and be clear in asking questions... not something vague like " Could u explain more please ? " after someone posted a script to help you. 

Explain what? Which part of the small script is difficult for you to understand after you have opened the helpfile and tried to understand each line?

Am I making myself clear or do you feel I am not being fair with you?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#15 ·  Posted

It was a problem to ask something here actually 
thank you anyway

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Uh? So you are going to give up because you actually have to do something yourself.  
Sweet.

*click*

Jos 

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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