Jump to content

Listview updated via HTTPGet in Func


MRXTO09
 Share

Recommended Posts

I've try this 

...
Global $listview = GUICtrlCreateListView("Username|Scans|Status", 0, 87, 550, 110, $LVS_SHOWSELALWAYS)
...

Func __refresh()
$result = __HttpGet($dominio1&"/room.php", "p="&$password&"&u="&$username&"&r="&$room)
MsgBox(0,"",$result)
$explode = _StringExplode($result, ",")
_GUICtrlListView_BeginUpdate($listview)
For $i = 0 to UBound($explode) - 2
_GUICtrlListView_AddItem($listview,$explode[$i])
Next
_GUICtrlListView_EndUpdate($listview)
Endfunc

OR

Func __refersh() 
_GUICtrlListView_DeleteAllItems($listview)
$result = __HttpGet($dominio1&"/room.php", "p="&$password&"&u="&$username&"&r="&$room)
$explode = _StringExplode($result, ",")
For $i = 0 to UBound($explode) - 2
_GUICtrlListView_AddItem($listview,$explode[$i])
Next
EndFunc

but dosen't work

please help me

Edited by MRXTO09
Link to comment
Share on other sites

Your __Httpget function has some kind of problem. As soon as you call that it locks up. If I comment out those lines it will update the listview. Also the refresh button is not enabled for some reason...sorry don't have time to figure that out right now.

Func __refresh()
    consolewrite ("refresh")
         _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($listview))
;~          $result = __HttpGet($dominio1&"/room.php", "p="&$password&"&u="&$username&"&r="&$room)
;~          $explode = _StringExplode($result, ",")
;~          For $i = 0 to UBound($explode) - 2
;~          GUICtrlCreateListViewItem($explode[$i],$listview)
;~          Next
GUICtrlCreateListViewItem("test|4|test",$listview)
Endfunc
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...