Jump to content
UBot Underground

[HELP]How Do I End A Loop - If Something Exists?


Recommended Posts

Title says it all, how do I end a loop If something exists and keep the loop going? I just dont want any commands to execute if something exists. And to keep the loop going. I dont want to stop the script if that makes sense.

Link to post
Share on other sites

Your question is somewhat confusing. Check out the if exists command on the wiki.

 

http://wiki.ubotstudio.com/wiki/Exists

 

Ya. Ok so if your setting up a bot to comment on something. But your account has a error and can't. If the error pops up you want the loop to end there and stop going but continue the next account in the same loop.

Link to post
Share on other sites

Have you script run the commands for commenting only if something exists. That could be some text that is only present on the page if the user is logged in. So, say a Log out button or some other element that only a logged in user can see on the page.

Link to post
Share on other sites

You can also add additional conditions. Like a counter for example. 

If you want to repeat something.

 

Loop while not exists.... AND counter < 5

 

Than you can retry something multiple times. But it's not running forever because you have a second condition (counter). 

 

I have those checks in all my newer bots. I navigate to a site. Check for a specific element. 

If it's not there, I wait a couple of seconds and reload the page. I retry that 3 times. 

 

And all the additional commands are only executed when the elements I'm waiting for are really there.

 

Dan

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...