Jump to content

Listview problem


LerN
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers
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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

*click*

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...