Tony H. 16 Posted March 6, 2012 Report Share Posted March 6, 2012 Hey guys, when i try to execute some javascript nothing happens.I just tried to execute the node run javascript with the content:alert('hello'); But nothing at all is happening. so here is my question: 1.) how can i get UBot to execute the very simple javascript command.2.) is it also possible to load the complex javascript thing inside of ubot - like embedding the jquery library and then using this library to parse some elements that had been stored in a list or variable by UBot? Thanks in advancetony Quote Link to post Share on other sites
Legend 181 Posted March 6, 2012 Report Share Posted March 6, 2012 Did you run the "allow javascript" command? http://ubotstudio.com/forum/public/style_emoticons/default/blink.gif Quote Link to post Share on other sites
Eddie Waller 158 Posted March 6, 2012 Report Share Posted March 6, 2012 Hey guys, when i try to execute some javascript nothing happens.I just tried to execute the node run javascript with the content:alert('hello'); But nothing at all is happening. so here is my question: 1.) how can i get UBot to execute the very simple javascript command.2.) is it also possible to load the complex javascript thing inside of ubot - like embedding the jquery library and then using this library to parse some elements that had been stored in a list or variable by UBot? Thanks in advancetony 1) The reason nothing happened is because javascript alerts are automatically closed at the moment. If you need to display an alert, you can use the alert command. 2) Yes it is possible to embed jQuery onto a website, and you can use lists and variables with the run javascript command. Quote Link to post Share on other sites
Beage 0 Posted March 7, 2012 Report Share Posted March 7, 2012 I am having the same problem in Ubot 4, it doesn't workIn Ubot 3 it works, is it disabled somehow in 4?And yes, I turned it on, but it still doesn't work Quote Link to post Share on other sites
rumen 3 Posted March 7, 2012 Report Share Posted March 7, 2012 To test any js in the page where must be declared.To test your java script You can use load html("<script type=\"text/javascript></script>")then "run java script" command. Best Quote Link to post Share on other sites
Beage 0 Posted March 7, 2012 Report Share Posted March 7, 2012 Here is the code I tried in 4 load html(""<script type=\"text/javascript></script>"")alert('Copy to text to clipboard');didn't work, but works in 3There is a workaround using the alert commandAlso, does anyone know how would I go about coping text to the clipboard? Quote Link to post Share on other sites
JohnB 255 Posted March 8, 2012 Report Share Posted March 8, 2012 1) The reason nothing happened is because javascript alerts are automatically closed at the moment. If you need to display an alert, you can use the alert command. 2) Yes it is possible to embed jQuery onto a website, and you can use lists and variables with the run javascript command. Did you read this? They are disabled...you can use alerts from the flow menu. John Quote Link to post Share on other sites
Beage 0 Posted March 8, 2012 Report Share Posted March 8, 2012 yes, I did use the alerts, and it worksHow do I enable the JavaScript in UBot 4?Or there is no way to do it?Right now I am stuck at coping the text to the clipboard.I need a way to copy the text that I saved to the clipboard topaste it to in another site, but I don't want to do it by right clicking.I am looking it to this NirCmd I found, but I was going to try to find some java code.thanks for the help though, I appreciate it very muchSpeak soon, Beage Quote Link to post Share on other sites
Eddie Waller 158 Posted March 9, 2012 Report Share Posted March 9, 2012 yes, I did use the alerts, and it worksHow do I enable the JavaScript in UBot 4?Or there is no way to do it?Right now I am stuck at coping the text to the clipboard.I need a way to copy the text that I saved to the clipboard topaste it to in another site, but I don't want to do it by right clicking.I am looking it to this NirCmd I found, but I was going to try to find some java code.thanks for the help though, I appreciate it very muchSpeak soon, Beage Javascript is enabled in UBot 4 by default. There is nothing special you need to do. The alert command will not show you anything because we automatically close alerts. If you have a question about specific javascript, you should post that instead. Quote Link to post Share on other sites
Beage 0 Posted March 9, 2012 Report Share Posted March 9, 2012 I figured it was enabled,cause it works in UBot 3.As for running it no, JavaScript works in 4.It doesn't matter what JavaScript I use it will not work.I wanted to know why that is and if anyone has this problem. Quote Link to post Share on other sites
Eddie Waller 158 Posted March 9, 2012 Report Share Posted March 9, 2012 I figured it was enabled,cause it works in UBot 3.As for running it no, JavaScript works in 4.It doesn't matter what JavaScript I use it will not work.I wanted to know why that is and if anyone has this problem. Here's an example of javascript working in UBot 4. navigate("http://www.facebook.com/", "Wait") wait(5) run javascript("document.getElementById(\'firstname\').value = \"Hello\"") 1 Quote Link to post Share on other sites
Tony H. 16 Posted March 10, 2012 Author Report Share Posted March 10, 2012 1) The reason nothing happened is because javascript alerts are automatically closed at the moment. If you need to display an alert, you can use the alert command. 2) Yes it is possible to embed jQuery onto a website, and you can use lists and variables with the run javascript command. Thanks for the answer! Quote Link to post Share on other sites
SteveDC 0 Posted April 2, 2012 Report Share Posted April 2, 2012 It doesn't work for me, I get an error saying "the given key was not present in the dictionary" when I run this. For the life of me, I am yet to find a definitive step by step instruction of how to get javascript working in Ubot 4. Some threads mention javascript should be enabled, where do you do this? Some threads mention that javascript is already enabled in Ubot 4. Some threads mention that you need to use the script function in a load html command first. Please, can someone just point me to some clear instructions on how to use Javascript in Ubot 4 because whatever I do, I cant get it to work. All I am trying to do is do a simple document.write command by the way. Thanks in advance! Here's an example of javascript working in UBot 4. navigate("http://www.facebook.com/", "Wait") wait(5) run javascript("document.getElementById(\'firstname\').value = \"Hello\"") Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted April 2, 2012 Report Share Posted April 2, 2012 javascript in v4 is enabled by default, and nothing more needs to be done. the command you are showing selects an element on the page and doesnt write to it. Quote Link to post Share on other sites
JohnB 255 Posted April 2, 2012 Report Share Posted April 2, 2012 I'm not sure what's going on with your machine as that code works fine at my end... John Quote Link to post Share on other sites
peak_positions 2 Posted May 23, 2012 Report Share Posted May 23, 2012 Hi, run jvascript is working fine but not in UI html Panel. I would like to call the function which I declared in Ui html panel Scripts. I clearly Understood run ravascript command will work only in browser window. I tried in many ways to call the javascript function but it fails. Someone give a good solution for this. Thank You, Quote Link to post Share on other sites
Legend 181 Posted May 23, 2012 Report Share Posted May 23, 2012 Knowing very little about javascript, running pre-coded javascript has always been hit and miss for me and I've always approached it with that in mind, so if one pre-code doesn't work I've just tried another and eventually there's one that works... javascriptsource.com is a good source and sure beats learning to code it myself... http://ubotstudio.com/forum/public/style_emoticons/default/rolleyes.gif 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.