Sign in to follow this  
Followers 0
MRXTO09

Listview updated via HTTPGet in Func

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



up please

Share this post


Link to post
Share on other sites

Can you post your complete script? Also what does not work? Be more specific.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

resolved 

was GUICtrlSetDefColor(0xFFFFFF) and i dind see the text XD

Edited by MRXTO09

Share this post


Link to post
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
Sign in to follow this  
Followers 0