Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Is it possible to execute code from a seperate program using javascript??

    I am using a program called ubot which can use javascript but I'm not sure what type of code I would be using to use a part of the programming language in ubot. Here is an example I downloaded that will run the "definesub" when the program loads


    Code:
    ui stat monitor("<script type=\"text/javascript\">
        window.onload = ubot.runScript(\'definesub()\')
    </script>", "")
    define definesub {
        navigate("http://www.google.com/", "Wait")
        change attribute(<name="q">, "value", "Test")
        alert("Done!")
    }
    For example, "alert("done")" is a piece of code that ubot reads and is seperate from java script. What I am trying to do is load that command for example "alert("done")" using javascript and not the language ubot provides.

    Obviously I don't know the code which is why I am here, but am trying to get something like this to run:

    Code:
    ("<script type=\"text/javascript\">
        ubot.runScript(\'alert("done")\')
    </script>", "")
    Also I know javascript has its own "alert" command, I was just using that as an example. Thanks for any help!

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    UBOT looks pretty evil to me. I can't see any legitimate reason to use it. If I'm wrong, show me how.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    UBOT looks pretty evil to me. I can't see any legitimate reason to use it. If I'm wrong, show me how.
    I create scripts that will post to multiple of my websites so I don't have to log into each one and post my content on it. Also same goes for multiple forums i'm on if im creating a post that is the same across multiple forums.

    For example I could create a script that would post this exact thread I made across several coding forums so there would be more eyes on my question to try to help me out! Its really a great time saver!

    Do you know if my problem is solvable old pedant?

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,023
    Thanks
    75
    Thanked 4,323 Times in 4,289 Posts
    In theory, in standard browsers it's not possible (MSIE has some odd exceptions). In practice, if you are using a browser replacement--which appears to me to be what UBOT is, in part--then the rules are whatever UBOT allows.

    I think you are going to have to ask this one in one of the UBOT forums.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #5
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    In theory, in standard browsers it's not possible (MSIE has some odd exceptions). In practice, if you are using a browser replacement--which appears to me to be what UBOT is, in part--then the rules are whatever UBOT allows.

    I think you are going to have to ask this one in one of the UBOT forums.
    (
    Thanks that gives a little more.insight. you're right UBot is basically its own browser. I tried asking over at.the UBot forums but no one seemed to know if.it.was possible. Ill just keep digging!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •