Ant 1 Posted April 6, 2012 Report Share Posted April 6, 2012 Hi, I have new to ubot and so have been been practising making bots for various social bookmarking websites but Digg is really casuing me some trouble for some reason. When I input an incorrect captcha to see if the loop is working correctly the captcha box comes up again with the new captcha image but what I enter into the box does not get enterted into the captcha text box on the webpage. I don't understand why as before the loop starts, the captcha text transfers from ubot to the webpage just fine. Anyone got any ideas what I am doing wrong? define CreateDigg(#HotmailEmail) { reset account("Any") clear cookies navigate("http://digg.com/", "Wait") click(<class="modal-close-inline">, "Left Click", "No") click($element offset(<create account link>, 0), "Left Click", "No") wait for browser event("Everything Loaded", "") click(<innertext="email address">, "Left Click", "No") wait for browser event("Everything Loaded", "") type text(<for="email">, #HotmailEmail, "Standard") type text(<for="register-username">, $account data("Username"), "Standard") type text(<for="password-register">, $account data("Password"), "Standard") click(<name="continue">, "Left Click", "No") wait for browser event("Everything Loaded", "") if($exists(<create account button>)) { then { type text(<name="recaptcha_response_field">, $solve captcha(<outerhtml=w"<img style=\"display:block;\" alt=\"reCAPTCHA challenge image\" height=\"57\" width=\"300\" src=\"http://www.google.com/recaptcha/api/image?c=*\">">), "Standard") click(<create account button>, "Left Click", "No") wait for browser event("Everything Loaded", "") } else { loop while($not($exists(<create account button>))) { reset account("Any") type text(<for="email">, #HotmailEmail, "Standard") type text(<for="register-username">, $account data("Username"), "Standard") type text(<for="password-register">, $account data("Password"), "Standard") click(<name="continue">, "Left Click", "No") wait for browser event("Everything Loaded", "") } } } if($not($exists(<create account button>))) { then { save to file("C:\\Users\\Ant\\Documents\\DiggAccount.csv", "{$account data("Username")},{$account data("Password")}") set(#Title, "Digg Account Created!", "Global") } else { loop while($exists(<create account button>)) { click(<id="recaptcha_reload">, "Left Click", "No") wait(1) type text(<name="recaptcha_response_field">, $solve captcha(<outerhtml=w"<img style=\"display:block;\" alt=\"reCAPTCHA challenge image\" height=\"57\" width=\"300\" src=\"http://www.google.com/recaptcha/api/image?c=*\">">), "Standard") wait(5) click(<create account button>, "Left Click", "No") wait for browser event("Everything Loaded", "") } save to file("C:\\Users\\Ant\\Documents\\DiggAccount.csv", "{$account data("Username")},{$account data("Password")}") set(#Title, "Digg Account Created!", "Global") } } } Quote Link to post Share on other sites
Legend 181 Posted April 6, 2012 Report Share Posted April 6, 2012 You can try something like this: define CreateDigg(#HotmailEmail) { reset account("Any") clear cookies navigate("http://digg.com/", "Wait") click(<class="modal-close-inline">, "Left Click", "No") click($element offset(<create account link>, 0), "Left Click", "No") wait for browser event("Everything Loaded", "") click(<innertext="email address">, "Left Click", "No") wait for browser event("Everything Loaded", "") type text(<for="email">, $account data("Email"), "Standard") type text(<for="register-username">, $account data("Username"), "Standard") type text(<for="password-register">, $account data("Password"), "Standard") click(<name="continue">, "Left Click", "No") wait for browser event("Everything Loaded", "") if($exists(<create account button>)) { then { type text(<name="recaptcha_response_field">, $solve captcha(<style="display:block;">), "Standard") click(<create account button>, "Left Click", "No") wait for browser event("Everything Loaded", "") if($exists(<innertext="CAPTCHA test failed">)) { then { CreateDigg(#HotmailEmail ) } else { } } } else { loop while($not($exists(<create account button>))) { reset account("Any") type text(<for="email">, #HotmailEmail, "Standard") type text(<for="register-username">, $account data("Username"), "Standard") type text(<for="password-register">, $account data("Password"), "Standard") click(<name="continue">, "Left Click", "No") wait for browser event("Everything Loaded", "") } } } if($not($exists(<create account button>))) { then { save to file("C:\\Users\\Ant\\Documents\\DiggAccount.csv", "{$account data("Username")},{$account data("Password")}") set(#Title, "Digg Account Created!", "Global") } else { loop while($exists(<create account button>)) { click(<id="recaptcha_reload">, "Left Click", "No") wait(1) type text(<name="recaptcha_response_field">, $solve captcha(<outerhtml=w"<img style=\"display:block;\" alt=\"reCAPTCHA challenge image\" height=\"57\" width=\"300\" src=\"http://www.google.com/recaptcha/api/image?c=*\">">), "Standard") wait(5) click(<create account button>, "Left Click", "No") wait for browser event("Everything Loaded", "") } save to file("C:\\Users\\Ant\\Documents\\DiggAccount.csv", "{$account data("Username")},{$account data("Password")}") set(#Title, "Digg Account Created!", "Global") } }} Hope it helps... http://ubotstudio.com/forum/public/style_emoticons/default/smile.gif 1 Quote Link to post Share on other sites
Ant 1 Posted April 6, 2012 Author Report Share Posted April 6, 2012 Thanks just noticed your reply but managed to fix it myself. What I did was in the loop, I used the "change attribute command" instead of the "type text" command and it worked. Not sure why the "type text" command didn't work but oh well. Thanks Anyway Quote Link to post Share on other sites
Legend 181 Posted April 7, 2012 Report Share Posted April 7, 2012 Type text works... you just chose the wrong attribute... 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.