Brutal 164 Posted August 13, 2012 Report Share Posted August 13, 2012 The new updates are cool in 4.1.7, I love that you can take out the standard run/pause/stop bar.... But can someone tell me how you code those? I assume it will be a button, but proper procedure for creating the run stop and pause buttons would be great. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 13, 2012 Report Share Posted August 13, 2012 add your items to run inside a defined command, and call that command in the UI Button. done. Quote Link to post Share on other sites
Brutal 164 Posted August 13, 2012 Author Report Share Posted August 13, 2012 I have been working on that... Adding it all to define seems to be breaking it, but I'll get it nailed down. - Thanks for the reply TJ. Quote Link to post Share on other sites
P0s3id0n 90 Posted August 13, 2012 Report Share Posted August 13, 2012 I found this on another thread. ui html panel("<button onclick=\"ubot.runScript(\'youtube()\')\">Youtube Go</button>", 300) define youtube { navigate("http://www.youtube.com", "Wait") } Ok that solves how to run your script but how about stop and pause? I tried making the UI Html code and dropping the stop script command but it doesn't let me use that. What is the proper command for the pause and stop? Quote Link to post Share on other sites
Bliss 194 Posted August 13, 2012 Report Share Posted August 13, 2012 I found this on another thread. ui html panel("<button onclick=\"ubot.runScript(\'youtube()\')\">Youtube Go</button>", 300) define youtube { navigate("http://www.youtube.com", "Wait") } Ok that solves how to run your script but how about stop and pause? I tried making the UI Html code and dropping the stop script command but it doesn't let me use that. What is the proper command for the pause and stop? Hi, If you are running in a define from a button and want to stop it the best way i have found is to set a variable in the define, so if the stop button (you make) is pressed then it sets variable #stopbutton to "stop" or 1 or something, then in your define you check for that variable and if it = "stop" or 1 or whatever you used then do a STOP SCRIPT. You could do the same with a pause also, use the button to set a variable and check for the variable in the define . if its set then use the pause command. That's the best way i found out how to do it. Hope this helps. Jane Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 13, 2012 Report Share Posted August 13, 2012 best way to stop a script from running. Setup a button to run stop script Quote Link to post Share on other sites
P0s3id0n 90 Posted August 13, 2012 Report Share Posted August 13, 2012 Yes I tried that TJ but the UI HTML panel doesn't allow me to drop the stop script or pause script commands inside. Quote Link to post Share on other sites
P0s3id0n 90 Posted August 13, 2012 Report Share Posted August 13, 2012 Here is how I figure out how to make the Run, Pause & Stop work from the UI HTML ui html panel("<button onclick=\"ubot.runScript(\'youtube()\')\">Run</button> <button onclick=\"ubot.runScript(\'stop()\')\">Stop</button> <button onclick=\"ubot.runScript(\'pause()\')\">Pause</button>", 100) define stop { set(#stopscript, 1, "Global") } define pause { set(#pause, 1, "Global") } define youtube { set(#pause, 0, "Global") set(#stopscript, 0, "Global") navigate("http://www.youtube.com", "Wait") if($comparison(#pause, "=", 1)) { then { pause script } else { } } if($comparison(#stopscript, "=", 1)) { then { stop script } else { } } type text(<name="search_query">, "fuck", "Standard") wait(3) if($comparison(#pause, "=", 1)) { then { pause script } else { } } if($comparison(#stopscript, "=", 1)) { then { stop script } else { } } type text(<name="search_query">, " maria", "Standard") wait(3) if($comparison(#pause, "=", 1)) { then { pause script } else { } } if($comparison(#stopscript, "=", 1)) { then { stop script } else { } } type text(<name="search_query">, " hard", "Standard") } There are a few things that I do not like about this solution. To make the stop script work you have to place the if($comparison(#stopscript, "=", 1)) { then { stop script } else { } Several times across your bot making any simple bot a lager bot with many lines of code. The other part that I do not like is that I can make it Pause no problem but I can't make it resume because if I hit run again instead of picking up from the pause it just makes a whole new run. Does somebody else has a different solution for this? I will love to hear them. Thanks, P0s3id0n 1 Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted August 13, 2012 Report Share Posted August 13, 2012 place the stop script into a defined command, then call it with a ui html button. Quote Link to post Share on other sites
P0s3id0n 90 Posted August 13, 2012 Report Share Posted August 13, 2012 That was the first thing I tried but it didn't worked. See the code for that here ui html panel("<button onclick=\"ubot.runScript(\'youtube()\')\">Run</button> <button onclick=\"ubot.runScript(\'stop()\')\">Stop</button> <button onclick=\"ubot.runScript(\'pause()\')\">Pause</button>", 100) define youtube { navigate("http://www.youtube.com", "Wait") type text(<name="search_query">, "fuck", "Standard") wait(3) type text(<name="search_query">, " maria", "Standard") wait(3) type text(<name="search_query">, " hard", "Standard") } define stop { stop script } define pause { pause script } Quote Link to post Share on other sites
P0s3id0n 90 Posted August 13, 2012 Report Share Posted August 13, 2012 Here is an improved version of the code with the run and stop working perfectly from the UI HTML Panel. The Pause Button still has issues ui html panel("<button onclick=\"ubot.runScript(\'youtube()\')\">Run</button> <button onclick=\"ubot.runScript(\'stop()\')\">Stop</button> <button onclick=\"ubot.runScript(\'pause()\')\">Pause</button>", 100) define pausecheck { if($comparison(#pause, "=", 1)) { then { pause script } else { } } } define stopcheck { if($comparison(#stopscript, "=", 1)) { then { stop script } else { } } } define stop { set(#stopscript, 1, "Global") } define pause { set(#pause, 1, "Global") } define youtube { set(#pause, 0, "Global") set(#stopscript, 0, "Global") navigate("http://www.youtube.com", "Wait") stopcheck() pausecheck() type text(<name="search_query">, "Make", "Standard") wait(3) stopcheck() pausecheck() type text(<name="search_query">, " Money", "Standard") wait(3) stopcheck() pausecheck() type text(<name="search_query">, " Online", "Standard") } 1 Quote Link to post Share on other sites
Praney Behl 314 Posted August 14, 2012 Report Share Posted August 14, 2012 <button onclick=\"ubot.runScript(\'pause()\')\">Pause</button>", 100) This would only pause the operation but to start it from exactly where it was paused there needs to be a hook for the run command. Pretty much like if I remember correctly there was a command in V 3.x called "start script" Ubot Devs. please answer this. Quote Link to post Share on other sites
jason 101 Posted August 15, 2012 Report Share Posted August 15, 2012 Let me check with Seth and Ed and we'll get back to you asap. Quote Link to post Share on other sites
Praney Behl 314 Posted August 16, 2012 Report Share Posted August 16, 2012 Let me check with Seth and Ed and we'll get back to you asap. Thanks mate, I am waiting for your reply. Quote Link to post Share on other sites
jason 101 Posted August 16, 2012 Report Share Posted August 16, 2012 Ok, we've got plans to add a start script command. Thx for keeping us on our toes everyone. Quote Link to post Share on other sites
Praney Behl 314 Posted August 16, 2012 Report Share Posted August 16, 2012 Thanks mate, will wait for it. Any ETA on this as without the command removing Run, Pause,Stop button is not really gonna work. Quote Link to post Share on other sites
Brutal 164 Posted September 3, 2012 Author Report Share Posted September 3, 2012 Ok, we've got plans to add a start script command. Thx for keeping us on our toes everyone. Any ideas on this yet? Quote Link to post Share on other sites
suntattood 0 Posted September 7, 2012 Report Share Posted September 7, 2012 Nice working on your codes. I'm learning a lot.. Quote Link to post Share on other sites
thinkaholic 4 Posted September 13, 2012 Report Share Posted September 13, 2012 Almost a month since "you've got plans to add a start script command." Any update? Is it really that difficult to add? Quote Link to post Share on other sites
warriorfullights 0 Posted September 17, 2012 Report Share Posted September 17, 2012 These are great codes. I'm really getting a lot from it and been using a few of them already. http://imagicon.info/cat/5-34/boredom.gif Quote Link to post Share on other sites
jason 101 Posted September 18, 2012 Report Share Posted September 18, 2012 We've got a bunch of things coming up for a future release, sorry it's taking a while - we just have a whole lot going on for next big update Quote Link to post Share on other sites
Legend 181 Posted September 18, 2012 Report Share Posted September 18, 2012 We've got a bunch of things coming up for a future release, sorry it's taking a while - we just have a whole lot going on for next big update Just hope its not a v.5 that will render all v.4 (and v.3.5) scripts obsolete... Quote Link to post Share on other sites
General Lee 12 Posted September 22, 2012 Report Share Posted September 22, 2012 Any update on the start script? That would be killer... Quote Link to post Share on other sites
nimbystripes 0 Posted September 28, 2012 Report Share Posted September 28, 2012 I can't hardly wait.. I hope it will be sooner. http://imagicon.info/cat/5-34/biggrin.png Quote Link to post Share on other sites
Twitter Dominator 125 Posted November 21, 2012 Report Share Posted November 21, 2012 this thread is a clear indication that this forum is bad need of some ubot core developers who answer questions unfortunately Jason never followed through with any actual answers Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.