End loop
Started by The450Man, Nov 01 2011 05:45 PM
8 replies to this topic
#1
Posted 01 November 2011 - 05:45 PM
It would be great if there was a command that could end a loop and one that can simply end that instance of the loop once a condition was met.
#2
Posted 01 November 2011 - 07:44 PM
A loop only runs as long as certain conditions are being met... so it ends automatically. You can put a pause or stop script command in at the end or a call to any instance of a define if that would help.
__________________________________________
... this message has been approved by me...
#3
Posted 01 November 2011 - 07:57 PM
Loop while comparison #var != "END"
if something
set #var = "END"
Need a real life example let me know what your trying to do. but that same scenario should work very well.
if something
set #var = "END"
Need a real life example let me know what your trying to do. but that same scenario should work very well.
#4
Posted 01 November 2011 - 10:12 PM
an example would be an account checker bot.
each account has its own unique email,password and proxy.
sometimes something comes up that the actions can no longer continue and doing so just causes ubot to crash. Ive done this with lots of if statements to end the loop but its a pain nesting everything inside the else or then nodes. It gets a little cluttered when you have several. I think it would just be easier to have a command that skips the current loop.
Stoping the script would do just that, i want to continue to run, just skipping over that instance of that loop.
each account has its own unique email,password and proxy.
sometimes something comes up that the actions can no longer continue and doing so just causes ubot to crash. Ive done this with lots of if statements to end the loop but its a pain nesting everything inside the else or then nodes. It gets a little cluttered when you have several. I think it would just be easier to have a command that skips the current loop.
Stoping the script would do just that, i want to continue to run, just skipping over that instance of that loop.
#5
Posted 01 November 2011 - 10:15 PM
thats mainly the reason for conditional statements.
that if something then do something, else dont do anything, and ends or exit the loop.
The loop while before it you can set #var to true
and if it reaches a conditional that you wish to exit the loop set #var to false
and in the loop while comparison #var = true
otherwise it would exit the loop as soon as the #var is false
that if something then do something, else dont do anything, and ends or exit the loop.
The loop while before it you can set #var to true
and if it reaches a conditional that you wish to exit the loop set #var to false
and in the loop while comparison #var = true
otherwise it would exit the loop as soon as the #var is false
#6
Posted 07 December 2011 - 03:28 AM
Is there any way to order loop to go to next cycle after some period of time regardless of the actuall ability of loop to perform all the commands in it? I mean that when a command can not be executed and script stacks due to bad performance of target site you may resolve it all if there is a command which says that loop should be relaunched once again after some time regardless of success of the script.
#7
Posted 20 December 2011 - 03:59 PM
You can use "Return" command (value doesn't matter) in if statement, which will trigger the bot to leave current "custom command/script". So if you are running that custom command/script in a loop, it will then start with next run.
In your case you need to run that loop in a defined custom command/script, and you need to use that if statement, that will trigger return. By this both, defined command/script and your loop will be terminated, and bot will continue with commands after custom command/script.
Hope this will help you.
In your case you need to run that loop in a defined custom command/script, and you need to use that if statement, that will trigger return. By this both, defined command/script and your loop will be terminated, and bot will continue with commands after custom command/script.
Hope this will help you.
CLICK UBotDev.com to get FREE UBot Plugins!
#8
Posted 14 February 2012 - 08:01 PM
I've been searching for a couple hours now and I've hit the wall... I know this should be a fairly straightforward process but I'm just not understanding how to exit the 'loop while' after the conditions have been satisfied.
To be more specific, I'm trying to create a test bot that enters a false value in the UBot Playground CAPTCHA form using the manual $solvecaptcha browser function. After entering a false value on purpose, the bot submits the form. The 'loop while' is supposed to search the page for the text confirming an incorrectly entered CAPTCHA value and loop until the value is entered correctly. However, it just keeps looping, even after the value has been entered correctly.
Thanks to anyone who can offer some input, I just bought UBot a few days ago and am loving it, just need to overcome this first hurdle...
To be more specific, I'm trying to create a test bot that enters a false value in the UBot Playground CAPTCHA form using the manual $solvecaptcha browser function. After entering a false value on purpose, the bot submits the form. The 'loop while' is supposed to search the page for the text confirming an incorrectly entered CAPTCHA value and loop until the value is entered correctly. However, it just keeps looping, even after the value has been entered correctly.
Thanks to anyone who can offer some input, I just bought UBot a few days ago and am loving it, just need to overcome this first hurdle...
#9
Posted 14 February 2012 - 11:06 PM
I will be testing this code to see if it will working ending a bot cycle process. Thanks for sharing.
Edited by keiooz, 14 February 2012 - 11:07 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users













