Jump to content
UBot Underground

Recommended Posts

  • 4 weeks later...

Wow, awesome.  I was just working on a tutorial for this same thing and then I finally checked to see if someone had already done it.  With the new window commands this will come in handy for scheduling bots to run daily (I need a bunch to run several times every day) and I won't even have to manually click play.  This is perfect!

Link to post
Share on other sites
  • 2 weeks later...

When I switch to another tab and then back to the first tab it onloads again. Does anyone know of a way not to do that?

 

I tried having an if then where it sets a variable after it loads the first time and I have an if the variable = 1 then do nothing. So it shouldn't run it but it does anyway

Link to post
Share on other sites
When I switch to another tab and then back to the first tab it onloads again. Does anyone know of a way not to do that?

 

I tried having an if then where it sets a variable after it loads the first time and I have an if the variable = 1 then do nothing. So it shouldn't run it but it does anyway

 

There is no need to use the code on the OP anymore the new version has an onload command and you can choose to  onload on bot launch or on tab.

  • Like 1
Link to post
Share on other sites
There is no need to use the code on the OP anymore the new version has an onload command and you can choose to  onload on bot launch or on tab.

only Dev-Version i thing  or?

Link to post
Share on other sites
  • 2 months later...
Lovely.. what do I do now as a Pro license with a big number of bots which used the javascript hack?

 

meh.

 

The onload workaround i posted here should work on Pro license. I still use this javascript workaround because the built in onload command is a bit buggy.

Link to post
Share on other sites
  • 4 weeks later...

This is awesome, and works GREAT, But I am very confused why actually... being in a ui stat monitor how come its not running repeatedly the whole time the bot is running? I must be confused about how the ui stat monitor works...

Link to post
Share on other sites

When I switch to another tab and then back to the first tab it onloads again. Does anyone know of a way not to do that?

 

I tried having an if then where it sets a variable after it loads the first time and I have an if the variable = 1 then do nothing. So it shouldn't run it but it does anyway

 

I just needed to do the same thing... here's how I did it and it works fine for me.

 

ui stat monitor("<script type=\"text/javascript\">
    window.setTimeout(function() \{ ubot.runScript(\'definesub()\') \}, 500)
</script>", "")
define definesub {
    if($comparison(#autorunstop, "!=", 1)) {
        then {
            navigate("http://www.google.com/", "Wait")
            change attribute(<name="q">, "value", "Test")
            alert("Done!")
            set(#autorunstop, 1, "Global")
        }
        else {
        }
    }
}
Link to post
Share on other sites
  • 7 months later...
  • 5 months later...

Is it better than the OnLoad command in Ubot ?

 

I have a large defined and bot freeze with me until all the task finished , Is this ONE freeze Also ! 

 

Ubot built in onload loads immediately after you open your bot. The reason it freeze. Its trying to execute everything at once.

This one will wait until the bot is fully loaded then execute your script.

IMO, this one is better. It causes me a lot of problems with my customers when i use the built in one.

Link to post
Share on other sites
Thanks Kreatus for the trick and for explaining it .
 
i tested it and want to say WoW much much better :)
 
I want to know though , I'm NOT using any Ui and after using it your Trick i get about 300px Ui !  

 

How to get rid of the UI ?

 

 

Thanks

Link to post
Share on other sites

 

Thanks Kreatus for the trick and for explaining it .
 
i tested it and want to say WoW much much better :)
 
I want to know though , I'm NOT using any Ui and after using it your Trick i get about 300px Ui !  

 

How to get rid of the UI ?

 

 

Thanks

 

 

If you have a uihtml code you can put the same code before </html>.

Link to post
Share on other sites

As a workaround. You can create a uihtml panel with the onload code and make the height 0 so there will be no visible panel.

 

Sample:

ui html panel("<script type=\"text/javascript\">
    window.setTimeout(function() \{ ubot.runScript(\'autoload()\') \}, 1000)
</script>", 0)

Link to post
Share on other sites
  • 10 months later...

mind is blown

 

snippet for calling ubot functions in javscript

 

thank you so much

 

how does that work?what is the ui stat monitor(as in more than what I thought it was)

 

totally shocked

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