Jump to content

Testing proxies - Always returns as half work.


Gui
 Share

Recommended Posts

Aye guys, In my script, there is a list view, where you can load proxies ( for proxy support in the bot.. ), and test them. When I always test them though, it always returns that only half work. If the proxy doesn't work, it deletes it. I've tried like 10 different lists with different proxies and ammounts, always returns that half of them work. Here is the section that tests them.

Func pinge()
    Local $xl
$l = _GUICtrlListView_GetItemCount($proxies)
    For $xl = 0 To $l step 1
        GUICtrlSetData($eeker,'Status : Testing, please wait.')
         $aItem = _GUICtrlListView_GetItemText($proxies, $xl)
        $iPing = Ping($aItem,3000)
        If $iPing = 0 Then
            _GUICtrlListView_DeleteItem($proxies,$xl)
        EndIf
        If $xl = $l * 2 Then
        ExitLoop
        EndIf
    Next
    
            GUICtrlSetData($eeker,'Working Proxies : ' & _GUICtrlListView_GetItemCount($proxies) & ' \ ' & $l)
            _GUICtrlListView_DeleteItem($proxies,-1)
EndFunc

If i'm doing something wrong, or there is a better way, please help me out. Thanks :)

GUI.

Link to comment
Share on other sites

What does

If $xl = $l * 2 Then ExitLoop

mean? You don't need an exitloop if you want to test all lines. And additionally I think if you delete an line with _GUICtrlListView_DeleteItem() the loop will skip the next line... if you delete a line you have to reduce $x1 by 1 because the next line has now the index as the deleted line before.

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...