Gui Posted November 20, 2009 Share Posted November 20, 2009 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 More sharing options...
KaFu Posted November 27, 2009 Share Posted November 27, 2009 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. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now