Jump to content
UBot Underground

How to stay in while if the condition occurs?


Recommended Posts

Hi guys i have a problem with a loop while....If the 2 conditions ($either) of the while is false the bot go out of the loop and run the next command this is normal and ok;

but if the 2 conditions ($either) of the while is true i want that the bot should continue to check conditions (must stay in while) without executing any commands.

 

in practice must exit from the loop and execute the command only if the 2 conditions is false.
 
This is the code:
ui text box("Account Attivo:", #Account)
ui stat monitor("Username:", #Username)
ui stat monitor("Timer:", #Contatore)
ui button("Clear Cookies") {
    clear cookies
}
set(#Username, $trim($scrape attribute(<outerhtml=w"<span id=\"*\">Offerta più alta:<br>*</span>">, "innertext")), "Global")
set(#Contatore, $trim($scrape attribute(<outerhtml=w"<span id=\"*\"><span class=\"*\"> * </span></span>">, "innertext")), "Global")
Loop()
define Loop {
    loop while($either($comparison(#Contatore, ">", 80), $comparison(#Username, "=", "Offerta più alta:{#Account}"))) {
        set(#Contatore, $trim($scrape attribute(<outerhtml=w"<span id=\"*\"><span class=\"*\"> * </span></span>">, "innertext")), "Global")
        set(#Username, $trim($scrape attribute(<outerhtml=w"<span id=\"*\">Offerta più alta:<br>*</span>">, "innertext")), "Global")
    }
    Clicca()
}
define Clicca {
    click(<outerhtml=w"<input type=\"button\" id=\"*\" onclick=\"*\" value=\"PUNTA\">">, "Left Click", "No")
    wait(10)
    Loop()
}

Thanks :)

Edited by emilix85
Link to post
Share on other sites
in practice, the loop should continue until both conditions are true:
if the both conditions are true (the loop stops) then >>> run command "Clicca"
if the both conditions are false (the loop stops) then >>> stay in the loop as long as the conditions are true (
How can I do this?)
 
must take the action only if the two conditions are true.
 
use the loop while because I need to follow 2 variables: a timer(#contatore), and usernames(#Username):
 
Loop()
define Loop {
    loop while($either($comparison(#Contatore, "<=", 80), $comparison(#Username, "=!", "Offerta più alta:{#Account}"))) {
        set(#Contatore, $trim($scrape attribute(<outerhtml=w"<span id=\"*\"><span class=\"*\"> * </span></span>">, "innertext")), "Global")
        set(#Username, $trim($scrape attribute(<outerhtml=w"<span id=\"*\">Offerta più alta:<br>*</span>">, "innertext")), "Global")
    }
Clicca()
}
define Clicca {
click(<outerhtml=w"<input type=\"button\" id=\"*\" onclick=\"*\" value=\"PUNTA\">">, "Left Click", "No")
wait(10)
Loop()
}

 

Thanks
Edited by emilix85
Link to post
Share on other sites
Loop()
define Loop {
    loop while($both($comparison(#Contatore, "<=", 80), $comparison(#Username, "=!", "Offerta più alta:{#Account}"))) {
        set(#Contatore, $trim($scrape attribute(<outerhtml=w"<span id=\"*\"><span class=\"*\"> * </span></span>">, "innertext")), "Global")
        set(#Username, $trim($scrape attribute(<outerhtml=w"<span id=\"*\">Offerta più alta:<br>*</span>">, "innertext")), "Global")
    }
    Clicca()
}
define Clicca {
    click(<outerhtml=w"<input type=\"button\" id=\"*\" onclick=\"*\" value=\"PUNTA\">">, "Left Click", "No")
    wait(10)
    Loop()
}

 

 

 

???

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...