Jump to content
UBot Underground

Auto Run Bot Not Displaying Browser Output? Bug Or Normal?


Recommended Posts

Ok, maybe this is somehow normal, but I don't think it should be normal anyway...

 

I've been building bots for quite awhile now, but I tried to convert one of my bots to auto run upon execution for the first time... (never had a need to auto run before now) I kept thinking the problem was a bad compile or something because it appears to be frozen because nothing will display on screen until the bot "stops". I must have compiled this thing 30 times trying to figure out whats happening, rearranging my code, eliminating plugin commands and everything else. I finally decided to create a log file in a loop to output to a file just to see if it was actually running or not, and sure enough it IS running and doing what its supposed too, but there is nothing in the html ui panel, and nothing in the browser that's visible until its done processing.

 

A) Is this normal?

B) How can I make it display... I don't want it to run silently I want to watch it and be able to hit the stop button or pause button thats in the html ui panel if necessary.

 

This is not my real code, but I am replicating the problem in simpler terms here where the problem is duplicated.

ui html panel("<button onclick=\"ubot.runScript(\'stop()\')\">stop</button>", "")
on load("Bot Loaded") {
    autorun()
}
define autorun {
    add list to list(%theurls, $list from text("www.yahoo.com,www.bing.com,www.sony.com,rt.com", ","), "Delete", "Global")
    loop($list total(%theurls)) {
        navigate("http://{$next list item(%theurls)}", "Wait")
        wait for browser event("Everything Loaded", "")
        wait(10)
    }
}
define stop {
    stop script
}

This should loop through 4 websites, pause for 10 seconds in between each one. When I load this code I will not see anything for about 40 seconds, and the first thing to pop onto the display is the ui html panel and the last website in the list, and its because nothing displays until the but comes to an end. Is this a bug, is it normal, and if its normal, is there a way to make it display instead of sitting there looking like its crashed?

 

Thanks

Link to post
Share on other sites

A few weeks ago I was talking with support and they didn't even recommend using navigate command inside on load("Tab Switch"), so I think that what you are doing just won't work.

 

I don't think that browser is ready until bot is fully loaded.

Link to post
Share on other sites

A few weeks ago I was talking with support and they didn't even recommend using navigate command inside on load("Tab Switch"), so I think that what you are doing just won't work.

 

I don't think that browser is ready until bot is fully loaded.

 

Sounds about like what they would say... Ubot is a "Browser Automation" tool but cant use "Navigate" in "On Load"... So how does anyone make an actual bot that can do anything, or is everyone just hiding the browser when they make bots that auto run?  I kind of figured it was something like this and it seems to me using a "wait for browser event" command of "Everything Loaded" should make it sit there and wait then, but it doesn't... well this is a major bummer for me. Thanks for your input.

Link to post
Share on other sites

I think you are missing something here buddy. Don't use "on load" to auto run bots, instead, use "/auto" parameter when you open the exe file.

 

For example:

c:\bot.exe /auto

The above Command Prompt/Windows Shortcut command will open UBot bot and auto run it.

 

 

Btw, I was asking them to load pages when I switch tab, and they said it's impossible, but still...I got it working.

  • Like 1
Link to post
Share on other sites

I think you are missing something here buddy. Don't use "on load" to auto run bots, instead, use "/auto" parameter when you open the exe file.

 

For example:

c:\bot.exe /auto

The above Command Prompt/Windows Shortcut command will open UBot bot and auto run it.

 

 

Btw, I was asking them to load pages when I switch tab, and they said it's impossible, but still...I got it working.

 

Lol, I was missing something and just came back here to post my findings and you beat me to it! hahaha... Would still be easier to not have to use this switch, but not  a big deal really. I was just sitting here in AWE of how stupid this was. Every bot I've built before basically has never been "runnable" at all as I have always coded things to where everything is ran from a define and a ui button, and clicking the regular "run" wouldn't do anything, so it never even dawned on me to try that, hahaha, I feel like an idiot now:)

Link to post
Share on other sites

We were all starters once if that help, although we didn't have "on load" command at that time. :)

 

If I was a beginner I wouldn't feel so stupid... been using ubot for over 2 years now! But I have been doing alot more with it lately, and never needed to run anything completely automatically before... and I am new to the DEV version as I just upgraded to it this month and I never used this on load command before so was not aware of its limitations... so that's my excuse and I'm sticking to it! :)

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