tahoecale 2 Posted February 26, 2015 Report Share Posted February 26, 2015 hey so im making a comment bot it uses proxies so if you load a dead proxy i want it to skip it. So what i have does is Loop (proxy list total)Set variable #proxyChange proxy #proxynav googleIf exists then run bot if it doesnt exists do nothing What i want to do is have it keep changing the proxy over and over till it google loads then run the bot once and then go back to checking proxies. But i want a variable to set how many times to run the bot. if i set the loop total to 10 it will just run 10 failed proxies and be done. I want the loop total to proxy list total but only run the bot 10 times. how could this be done? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted February 26, 2015 Report Share Posted February 26, 2015 Here you go ui open file("Proxy file", #proxy file) ui text box("Loops", #loops) clear list(%proxys) add list to list(%proxys, $list from file(#proxy file), "Delete", "Global") set list position(%proxys, 0) set(#worked, 0, "Global") loop while($comparison(#worked, "<", #loops)) { if($comparison($list total(%proxys), "<=", 0)) { then { alert("Ran out of working proxys") stop script } else { } } set(#proxy, $next list item(%proxys), "Global") change proxy(#proxy) navigate("https://www.google.com/?gws_rd=ssl", "Wait") if($exists(<name="q">)) { then { increment(#worked) } else { remove from list(%proxys, $list position(%proxys)) } } } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.