Jump to content



Photo

[FREE] HTML5 Progress Bar Source Code for (STD/PRO/DEV)

progress bar html5 html ui panel free source code

  • Please log in to reply
39 replies to this topic

#21 dankass

dankass

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 286 posts
  • LocationUnited States
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 13 May 2013 - 11:30 PM

 

Following TJ's multithreading process, I came up with this...


        set(#prog, $eval("var worknum =  {$multiply($divide(#num created, #number accounts), 100)}; worknumrnd = Math.floor(worknum);
worknumrnd"), "Global")
       

 

Thanks! That Math.floor part is what I've been trying to figure out to be able to release the standard & pro version to get it to round and display right. I was doing it with a paid plugin but didn't really want to post free code that required a paid plugin, so that did just the trick!



#22 orbital

orbital

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 213 posts
  • OS:Windows 8
  • Total Memory:4Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 02 June 2013 - 08:50 AM

Thanks for this. Just used it in one of my bots and it worked GREAT!!



#23 jimbourekas@yahoo.gr

jimbourekas@yahoo.gr

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 32 posts
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Professional Edition

Posted 12 June 2013 - 04:40 AM

very nice, thanks!



#24 Evernano

Evernano

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 74 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 14 July 2013 - 03:41 AM

Nice work, thanks dude...  ;)



#25 steelersfan

steelersfan

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 205 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 19 July 2013 - 08:00 AM

Very useful and very cool! Thanks a lot! :)



#26 Buckethead

Buckethead

    Member

  • Fellow UBotter
  • PipPip
  • 21 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5
  • License:Standard Edition

Posted 15 August 2013 - 06:12 AM

Hi, just a quick question , when i tried to use this code in my bot, I can't seem to get the percentage incrememts of the loading bar to match the progress of my bot,

 

see this code here: set(#looptotal, 20, "Global")

set(#loopcount, 1, "Global")

 

 

I want the loading bar to cycle through the loop count that corresponds with the number of urls it visits from a text file,

where loop count = each url out of say 100 urls in the text file, so 100 would be the looptotal, but how do I define it so it automatically works out the number by the amount of urls in the text file (because the number of url's in text file will vary)

 

how would I best go about changing this code for that purpose? thanks



#27 a2mateit

a2mateit

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 1765 posts
  • OS:Windows 10
  • Total Memory:More Than 9Gb
  • Framework:v4.5+, unsure
  • License:Developer Edition

Posted 15 August 2013 - 12:15 PM

set(#looptotal, %list total(yyour list here), "Global")

 

HTH


*404 ERROR*


#28 dankass

dankass

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 286 posts
  • LocationUnited States
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 25 August 2013 - 05:18 PM

Someone asked for an example of this using an actual list that is looped through,,, so, here is an example (there are obviously other ways to do this, and this is a very basic example).

 

Hope this helps...

add list to list(%mylist, $list from text("apple,orange,pear,mango,grape,pizza,hotdog,hamburger,tomato,celery,onion,corn,beans,cheeze,milk", ","), "Delete", "Global")
set(#progress, 0, "Global")
ui html panel("<body>
<progress variable=\"#progress\" fillwith=\"value\" max=\"100\" style=\"width:300px;\"></progress>
<b><span variable=\"#progress\" fillwith=\"innerhtml\"></span>%</b>
</body>", "")
set(#loopcount, 1, "Global")
loop($list total(%mylist)) {
    load html("Loop: {#loopcount} of  {$list total(%mylist)}<br><b>{$next list item(%mylist)}</b>")
    set(#progress, $eval("var tmp1 =  {$multiply($divide(#loopcount, $list total(%mylist)), 100)}; tmp2 = Math.floor(tmp1);
tmp2"), "Global")
    increment(#loopcount)
}




#29 pftg4

pftg4

    Homer

  • Fellow UBotter
  • PipPipPip
  • 770 posts
  • OS:Windows 8
  • Total Memory:3Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 25 August 2013 - 06:42 PM

this give's error can't divide 2 strings in the eval


Diplomacy is the art of telling somebody to go to hell in such a way as they actually look forward to the trip.

#30 dankass

dankass

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 286 posts
  • LocationUnited States
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 25 August 2013 - 07:22 PM

this give's error can't divide 2 strings in the eval

Oops, yea, i forgot to get rid of the #looptotal variable in a spot... I updated the code... thanks.



#31 zenos

zenos

    Advanced Member

  • Members
  • PipPipPip
  • 286 posts
  • LocationFrance
  • OS:Windows 7
  • Total Memory:More Than 9Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 29 August 2013 - 01:20 PM

A big thank you guys !!! 



#32 Enigma

Enigma

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 975 posts
  • OS:Windows 8
  • Total Memory:4Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 06 September 2013 - 06:15 AM

Pretty cool.

Thanks Dankass.


*** AVAILABLE FOR HIRE, PM ME ***

#33 cheater1

cheater1

    Newbie

  • Fellow UBotter
  • Pip
  • 9 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 08 September 2013 - 06:54 AM

I had a question about progress bar on ubot and this thread answered all of them. Thanks you so much for this thread! 



#34 UBot Marketer

UBot Marketer

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 100 posts
  • OS:Windows 8
  • Total Memory:6Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 13 September 2013 - 06:06 PM

nice one 



#35 beatngu

beatngu

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 295 posts
  • Location3021e68df9a7200135725c6331369a22
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 20 September 2013 - 01:57 AM

Has anyone a idea on how to get this to work with a wait command?

I am trying to do a countdown on a 12 sec wait and update the progress bar with the % of the wait.

What i have tried so far but it's not working that good in to calculate how long 1 loops takes in seconds and use loops to mach the wait command,the problem is that some loops takes longer than other so it will go out of sync after a while.


KARMA is a B*ICH  :P


#36 dankass

dankass

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 286 posts
  • LocationUnited States
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 20 September 2013 - 02:24 AM

Has anyone a idea on how to get this to work with a wait command?

I am trying to do a countdown on a 12 sec wait and update the progress bar with the % of the wait.

What i have tried so far but it's not working that good in to calculate how long 1 loops takes in seconds and use loops to mach the wait command,the problem is that some loops takes longer than other so it will go out of sync after a while.

 

Not sure what "out of sync" means because it infers a relationship to some other loop being synced together WITH the wait.... But, if I am wrong, and the progress bar simply has to update according to the length of the wait, I don't see why doing a loop with a 1 second wait per loop for 12 loops would not suffice to replace a 12 second wait time unless you are trying to be incredibly accurate down to fractions of a second for some reason, in which case a progress bar is probably not a great idea anyway. I have done (I think) exactly this once to display a countdown that waits for the next process to take place. Mine waited for like 5 minutes and that's how I did it was to make a loop to replace the wait and incremented it off. I have since found an even easier way to do this whole progress bar idea... I'll post it below....  To solve your wait command 12 second example, use the code below and replace 57 in the #kisslooptotal with 12, and change the wait command to 1 second. Will this work for what you are trying to do?  In fact, when I was doing this I needed to do this in so many places that I made the below code into a custom command just so I could drag it in as easily as I could a regular wait command.



#37 dankass

dankass

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 286 posts
  • LocationUnited States
  • OS:Windows 8
  • Total Memory:8Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 20 September 2013 - 03:00 AM

Here is a K.I.S.S Version of using this progress bar I've been using lately... (KISS Stands for "Keep It Simple Stupid"... I think its an American thing so figured I better clarify:)

 

Hopefully it helps some people out, I think its pretty straight forward, if not, feel free to ask questions...

ui html panel("<html><body><span variable=\"#kissprogress\" fillwith=\"innerhtml\"></span></body></html>", 100)
set(#kisslooptotal, 57, "Global")
set(#kissloopcount, 0, "Global")
loop(#kisslooptotal) {
    increment(#kissloopcount)
    wait(0.10)
    set(#kissprogress, "<progress id=\'p\' max=\"{#kisslooptotal}\" value=\"{#kissloopcount}\"></progress>", "Global")
}



#38 the_way

the_way

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 557 posts
  • OS:Windows 8
  • Total Memory:3Gb
  • Framework:v4.0
  • License:Developer Edition

Posted 30 March 2014 - 06:53 AM

Wow amazed that i only just came across this, simple and quick to use, thanks


2VHxTj5.png


#39 runsoftware

runsoftware

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 147 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 30 March 2014 - 12:39 PM

how do we add two of them?, i mean when i c+p the code it shows just one.


vrlfZGJ.png

 

Get a complete bot with full design developed, just PM me to start.


#40 botsimmer

botsimmer

    Advanced Member

  • Fellow UBotter
  • PipPipPip
  • 120 posts
  • OS:Windows 8
  • Total Memory:More Than 9Gb
  • Framework:v3.5 & v4.0
  • License:Developer Edition

Posted 07 May 2014 - 10:34 AM

Very nice- Thank you.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users