Jump to content
UBot Underground

Javscript in UBot


Recommended Posts

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 advance

tony

Link to post
Share on other sites

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 advance

tony

 

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.

Link to post
Share on other sites

I am having the same problem in Ubot 4, it doesn't work

In Ubot 3 it works, is it disabled somehow in 4?

And yes, I turned it on, but it still doesn't work

Link to post
Share on other sites

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

Link to post
Share on other sites

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 3

There is a workaround using the alert command

Also, does anyone know how would I go about coping text to the clipboard?

Link to post
Share on other sites

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

 

 

 

Link to post
Share on other sites

yes, I did use the alerts, and it works

How 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 to

paste 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 much

Speak soon, Beage

Link to post
Share on other sites

yes, I did use the alerts, and it works

How 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 to

paste 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 much

Speak 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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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\"")

  • Like 1
Link to post
Share on other sites

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!

Link to post
Share on other sites
  • 4 weeks later...

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\"")

Link to post
Share on other sites
  • 1 month later...

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,

Link to post
Share on other sites

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...