Jump to content

_GUICtrlListView_SetItemText help to output text to


larksp
 Share

Recommended Posts

i am having trouble outputting one of the func to list view

GUICtrlSetState($Bscan, $GUI_DISABLE)
    $prof = funcname1()
    For $a In $prof
                $index = _GUICtrlListView_AddItem($ListView1, $a)
                _GUICtrlListView_SetItemText($ListView1, $index, _funcname2($prof[0]),1)
    Next
    GUICtrlSetState($Bscan, $gui_enable)

so funcname1 will get a dos output then Return $var    example (dave  and fred)

so it take dave and inputs it into the another dos command       (funcname2 is set as Return $var2[0] )

the funcname2 will get another out put based on the results of the funcname1.. my computer it returns 2  but other computers may have more or less

so my problem is i think this line _GUICtrlListView_SetItemText($ListView1, $index, _funcname2($prof[0]),1)     it out puts both row(1) copy  (example 0 and 0  ) in the   if i change $prof[1] then both out puts 2nd value in there (example 1 and 1) id like (0 and 1) if there was more results then 1,2,3,4,5,ect so it all the different data not a copy

i tried $prof with out the "[0]" and i get nothing same as if i remove var2's return"[0]" also not work

id like it to output first data and then the 2nd

 

sorry for my English im not sure how to explain it in a better way (this is only test a program to learn getting the info i want to a text file or in this case i used a gui)

Link to comment
Share on other sites

well i guess i did not get any replies as no had clue what i wrote above :)

GUICtrlSetState($Bscan, $GUI_DISABLE)
    $prof = funcname1()
    $t = 0
    For $a In $prof
                $index = _GUICtrlListView_AddItem($ListView1, $a)
    Next
    
   for $i = 0 To UBound($prof) -1
     _GUICtrlListView_SetItemText($ListView1,$i, StringFormat(_funcname2($prof[$i])), 1)
            $t += $prof[$i]
        next
GUICtrlSetState($Bscan, $gui_enable)

this worked for me but im sure there is away to have only used only 1. For Loop

now to work out how to clear the table when the button its pushed rather than adding the same info again and again. im sure this should be easy enough for me to do

and have an option to save the listview text to a txt file

Edited by larksp
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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