ToNic Innovation 0 Posted June 4, 2012 Report Share Posted June 4, 2012 I have 2 quick questions I need help with. 1)I have created a button in the UI HTML panel. I want to use the button to start the bot. What code do I need to enter to accomplish this? 2)The information that the user enters is covered on 2 tabs (about 11 fields so divided into 2). Is there a way to code a button to go to the next tab when clicked? I realize you can do so bu just clicking the tab, but would like to make it as userfriendly as possible. Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted June 4, 2012 Report Share Posted June 4, 2012 Here's the code for UIbutton <button onclick="ubot.runScript('your define command()')"></button> just replace the "your define command" with your bot "define" that you wanted to execute. On your second question I think its not possible inside ubot at the moment. Quote Link to post Share on other sites
ToNic Innovation 0 Posted June 4, 2012 Author Report Share Posted June 4, 2012 Thanks for your reply. What I am actually confused about is what goes in the define section. What command would start the bot? Quote Link to post Share on other sites
Pete 121 Posted June 4, 2012 Report Share Posted June 4, 2012 tab1 ui button("Run tab 2") { nav()}navigate("http://www.bing.com/", "Wait") tab2 define nav { navigate("http://www.google.com/", "Wait")} That should help 1 Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted June 4, 2012 Report Share Posted June 4, 2012 Check this code to get a better understanding: ui html panel("<input type=\"submit\" value=\"Submit\" onclick=\"ubot.runScript(\'google()\')\"/>", 50) define google { navigate("http://www.google.com", "Wait") alert("Done!") } 1 Quote Link to post Share on other sites
ToNic Innovation 0 Posted June 5, 2012 Author Report Share Posted June 5, 2012 Thanks a bunch guys! After spending the day figuring it out, the bot is now complete. Now Google has thrown me a curve and flipped the text I enter backwards.... Guess I will have to figure a way around it before I release to the public. Quote Link to post Share on other sites
AutomationNinja 194 Posted June 5, 2012 Report Share Posted June 5, 2012 Flipped the text spɹÉÂÊÂÊžÉâ€Ã‰Âq? Quote Link to post Share on other sites
ToNic Innovation 0 Posted June 5, 2012 Author Report Share Posted June 5, 2012 Flipped the text spɹÉÂÊÂÊžÉâ€Ã‰Âq? More like sdrawkcab.....BTW, How did you do that?! Quote Link to post Share on other sites
ToNic Innovation 0 Posted June 5, 2012 Author Report Share Posted June 5, 2012 NM! Google is a wonderful thing!!! Adding more code than I would have liked but getting it to work! 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.