Arran'sDad 1 Posted June 10, 2013 Report Share Posted June 10, 2013 Hi folks, I have a bot using two different tabs. I have several 'Define' nodes in the first and just an input area in the second, since it needs more room. The inputs in the second tab are global and relate to the first. Basically it is a single software in two tabs. I have a button in the html UI panel in tab 2 which I set to run a script contained in tab 1. However it doesn't seem to work. I assume custom commands are not global and so I have to figure how to run tab 1 scripts from tab 2. Can this be done simply? Otherwise I'd have to copy my whole script to tab 2 and that doesn't seem like the easiest option. Hopefully that explains the problem. So the question is: How do I write my 'onclick' command for the tab 2 button so that it runs a script in tab 1? Thanks in advance, Dave Quote Link to post Share on other sites
UBotDev 276 Posted June 10, 2013 Report Share Posted June 10, 2013 You can run any defined command/function from any tab, no matter in which tab it is placed. The HTML button should look like: <input type="button" value="BUTTON" onclick="ubot.runScript('Script()')"> Where "Script()" is the name of your script (empty brackets tell UBot that there are no parameters) Quote Link to post Share on other sites
Arran'sDad 1 Posted June 10, 2013 Author Report Share Posted June 10, 2013 Ok thanks. That's what it looks like. It just didn't work when, of all times, I was doing a video tutorial. I'll check it over again. I just wasn't sure as I know you can get scripts that put tabs in a single pane, whereas I have used the Ubot 'add a new script' button. Back to the drawing board. Thanks again, Dave Quote Link to post Share on other sites
UBotDev 276 Posted June 10, 2013 Report Share Posted June 10, 2013 This approach works just fine: http://screencast.com/t/ctaX0fB8Fabc 1 Quote Link to post Share on other sites
Arran'sDad 1 Posted June 10, 2013 Author Report Share Posted June 10, 2013 Much appreciated. I'll keep looking. Thanks again 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.