blazo 5 Posted September 13, 2010 Report Share Posted September 13, 2010 Hi guys me again this is my question how do you loop and reenter captcha when you write it wrong. So basically I have a form I put all the information inside but I get the captcha wrong like this the form will reload again and I'm stuck becuase at the end of the sub I have wait finish and then continue to the next sub but I don't know how to make it so if the captcha is wrong to repeat the sub once again and let me try again . Any ideas. Quote Link to post Share on other sites
daddydanimal 2 Posted September 13, 2010 Report Share Posted September 13, 2010 Hi guys me again this is my question how do you loop and reenter captcha when you write it wrong. So basically I have a form I put all the information inside but I get the captcha wrong like this the form will reload again and I'm stuck becuase at the end of the sub I have wait finish and then continue to the next sub but I don't know how to make it so if the captcha is wrong to repeat the sub once again and let me try again . Any ideas. what i normally do is use the if command like so 2-4 times in a row repeat this 2-4 times if search page the error message you get if captcha is wrongthenchose by attribute decode chosen captcha fill field click button delay 3 then at the end of them i add if search page the error message you get if captcha is wrongthenrun javaalert('WOW you really suck at this you have entered the wrong captcha 5 times in a row the bot will now stop please try again latter after you get your eyes checked '); pause script chose by attribute decode chosen captcha fill field click button delay 3 or you can set#captchasolved=no decode chosen captcha fill fieldclick button delay 3search pagethe message you get if captcha is rightthenset#captchasolved=Yes while #captchasolved=no if search page the error message you get if captcha is wrongthenchose by attribute decode chosen captcha fill fieldclick button delay 3 if search page the message you get if captcha is rightthenset#captchasolved=Yes basically will keep looping until you get it right Quote Link to post Share on other sites
JohnB 255 Posted September 13, 2010 Report Share Posted September 13, 2010 Another option is to put the captcha solving process in a sub followed by one if/then statement. The if/then statement can be either inside or outside of the sub, it will have the same result. If (captcha is wrong) Then run sub (captcha) Quote Link to post Share on other sites
blazo 5 Posted September 13, 2010 Author Report Share Posted September 13, 2010 Thank you daddydanimal it works here is a small sub for people that are starting like me and are wondering what you are talking about captcha-solver.ubot 1 Quote Link to post Share on other sites
blazo 5 Posted September 13, 2010 Author Report Share Posted September 13, 2010 Thanks JohnB I will try that to by the way I must say this is one of the best communities Quote Link to post Share on other sites
pftg4 102 Posted September 13, 2010 Report Share Posted September 13, 2010 you can also use the while loop would be the best way Pftg4 Quote Link to post Share on other sites
Super Dave 26 Posted September 17, 2010 Report Share Posted September 17, 2010 you can also use the while loop would be the best wayPftg4As Pftg4 mentioned a while loop would be the best and most flexible. Here's how I handle the multiple attempts as well as setting a max limit set #num-tries = 0 set #max-tries = 5 set #test-pass = 0 WHILE both #test-pass = 0 #num-tries < #max-tries inc #num-tries // do captcha stuff waitFinish if searchPage("Something Specific to the 'Success' page") then inc #test-pass END WHILE if searchPage("Something Specific to the 'Success' page) then // More code here now that captions are solved else // Something else here if attempts went over the max allowed. Quote Link to post Share on other sites
theninjamanz 29 Posted September 17, 2010 Report Share Posted September 17, 2010 As Pftg4 mentioned a while loop would be the best and most flexible. Here's how I handle the multiple attempts as well as setting a max limit set #num-tries = 0 set #max-tries = 5 set #test-pass = 0 WHILE both #test-pass = 0 #num-tries < #max-tries inc #num-tries // do captcha stuff waitFinish if searchPage("Something Specific to the 'Success' page") then inc #test-pass END WHILE if searchPage("Something Specific to the 'Success' page) then // More code here now that captions are solved else // Something else here if attempts went over the max allowed. ALL KNEEL. THE WHILE HAS POWER! Quote Link to post Share on other sites
Cornerstone 0 Posted September 28, 2010 Report Share Posted September 28, 2010 Thanks for the tipI've been using the while command with a sub but your solution is much more elegent Quote Link to post Share on other sites
ajacko 15 Posted May 6, 2011 Report Share Posted May 6, 2011 ALL KNEEL. THE WHILE HAS POWER! nice code! Thanks Ninjamanz! 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.