darknode 3 Posted December 23, 2013 Report Share Posted December 23, 2013 Problems getting a clicked link inside a load html command to function in a new window. example on load("Bot Loaded") { load html("<a href=\"http://www.google.com\" target=\"_blank\">Go to google</a> ") } compile the bot.load the bot.click link.nothing.click link again.nothing.click click click click *bashes keyboard*nothing. + missing key. Quote Link to post Share on other sites
LazyBotter 188 Posted December 23, 2013 Report Share Posted December 23, 2013 Only works in the html panel... Quote Link to post Share on other sites
darknode 3 Posted December 23, 2013 Author Report Share Posted December 23, 2013 Only works in the html panel... I need a work around. have a project that requires external browser window from load html. Quote Link to post Share on other sites
blumi40 222 Posted December 23, 2013 Report Share Posted December 23, 2013 i thing isnt so easy cause of browsersandboxes (dont allows open external programs)the only way what works maybe, is to scraoe the link and offert it in your UI Panel Quote Link to post Share on other sites
darknode 3 Posted December 23, 2013 Author Report Share Posted December 23, 2013 the problem with that is that the way the script works is it scraps data, then loads a new html page to display that data.if you did that in the ui panel, the data does not refresh, and if it did, it would reset the the form fields no? i thing isnt so easy cause of browsersandboxes (dont allows open external programs)the only way what works maybe, is to scraoe the link and offert it in your UI Panel Quote Link to post Share on other sites
blumi40 222 Posted December 23, 2013 Report Share Posted December 23, 2013 i real don't know it was an idea i would trycause i see it is the only possiblety u got maybe another way is to scrap the link and doit over shell comand Quote Link to post Share on other sites
darknode 3 Posted December 23, 2013 Author Report Share Posted December 23, 2013 that's actually a good idea.with windows, you can open a browser using the start command. cmdstart http://www.youtube.com/#video hmm. thanks for reminding me of that. loli'll have to see if i can execute a shell command from the loaded html pages links or buttons. i've not done that before. tried to avoid utilizing any outside commands to prevent trust issues. i real don't know it was an idea i would trycause i see it is the only possiblety u got maybe another way is to scrap the link and doit over shell comand Quote Link to post Share on other sites
darknode 3 Posted December 23, 2013 Author Report Share Posted December 23, 2013 It doesn't seem to allow shell("start http://youtube.com") but if you do it this way, it does work. save to file("start.bat", "start http://www.youtube.com") shell("start.bat") Quote Link to post Share on other sites
darknode 3 Posted December 23, 2013 Author Report Share Posted December 23, 2013 as for links if anyone is wondering, <a href=\"#\" target=\"_blank\" onclick=\"ubot.runScript(\'browse()\')\">Go to google</a> I'd be curious to figure a way to modify a variable from the same link, so that inside the runscript, it will include a url already defined.until then, I guess I have a bunch of defines to make hope that helps someone looking for a work-around. on load("Bot Loaded") { load html("<a href=\"#\" target=\"_blank\" onclick=\"ubot.runScript(\'browse()\')\">Go to google</a>") } define browse { save to file("start.bat", "start http://www.google.com") shell("start.bat") delete file("start.bat") } Quote Link to post Share on other sites
blumi40 222 Posted December 23, 2013 Report Share Posted December 23, 2013 try cmd.exe /s start http://www.google.commaybe that works Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted December 23, 2013 Report Share Posted December 23, 2013 Is this what you are trying to do? http://www.ubotstudio.com/forum/index.php?/topic/12812-example-popups-in-new-window-source/ Or here shell("cmd.exe /c start http://www.r2-vps.net") from here http://www.ubotstudio.com/forum/index.php?/topic/9608-monetizing-a-free-bot/page-2 same thread (lot's of things here) ui html panel("<a href=\"#;\" onclick=\"ubot.runScript(\'goBabyGo\');\">Click here </a>", 50)define goBabyGo { shell("cmd.exe /c start http://imautobots.com")} TC Quote Link to post Share on other sites
darknode 3 Posted December 23, 2013 Author Report Share Posted December 23, 2013 Is this what you are trying to do? http://www.ubotstudio.com/forum/index.php?/topic/12812-example-popups-in-new-window-source/ Or here shell("cmd.exe /c start http://www.r2-vps.net") from here http://www.ubotstudio.com/forum/index.php?/topic/9608-monetizing-a-free-bot/page-2 TCi've already coded it to use define's. works good. i'll change that in a later version to prevent a new file being created. 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.