Rasho Han 1 Posted January 24, 2012 Report Share Posted January 24, 2012 I am trying to make several bots that sign up to different sites for me, but I am at a point in my botting where I want to make better and more logical bots that do not break as easily and if they do they would report to me where the problem is. The huge problem I am having now is that I want to make each bot check for elements on a page and if they are there go forward with a "define" function. Now that part is easy and pretty cut and dry. However the part of "else" is what gets me. I had initially wanted to just return an "alert" error and then thought "what if I could loop a fix or reload of sorts a few times and then if they ALL fail I can return the alert?". I'll give a working example: I have a bot that so far goes to squidoo and clicks on the signup button, it then has an if statement that looks for the text "Create a new Squidoo account!" if the text is returned then it proceeds to do the fill in process I have contained in a "define" command. all is well! However if it does not find this text I want it to do something else, perhaps reload everything and start over, but only a few times. I know that if I just put the commands that go to squidoo again and try to click, that it will just get stuck in an infinite loop, and I don't want that obviously. So I decided to use a "loop" command, however I have no idea how I should be implementing this. Basically my question is more of a flow question than anything. I just can't wrap my head around it very well at all. Can anyone help me out in figuring what to do? This has given me no end of stress because this method of checks and balances is important to all the future bots that I make. I want to be a good ubotter and keep my personal tool arsenal strong and always up to date. My business depends on it. Thanks all! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 24, 2012 Report Share Posted January 24, 2012 You could always use a loop while looping while #var = no and it keeps trying so long as #var is no once its created set #var = yesand it will exit the loop Quote Link to post Share on other sites
Rasho Han 1 Posted January 25, 2012 Author Report Share Posted January 25, 2012 Damn i did not think of that! That is so simple it makes me feel stupid haha! Thanks a lot TJ! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted January 25, 2012 Report Share Posted January 25, 2012 its all good bud. glad it helped.. 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.