AutomationNinja 194 Posted November 15, 2012 Report Share Posted November 15, 2012 Aloha,I am working on my very first gui and I don't know the first thing about javascript. When I added my html to ubot I get this --->"Error: The given key was not present in the dictionary.Source 17> > change settings"So I guess that has something to do with <script type="text/javascript">window.onload = ubot.runScript('change settings()')</script> ?? I was using the free footprints bot as a sample to get me started and that was the code that was in there. Not sure if I am on the right track with my HTML but this is what it is looking like so far:<html><head><meta content="text/html; charset=ISO-8859-1"http-equiv="content-type"><title>gui</title><script type="text/javascript">window.onload = ubot.runScript('change settings()')</script></head><body> <p>Keyword: <input variable="#keyword" fillwith="value" type="placeholder"> Keyword</p> <p><input variable="#posttoblogs" fillwith="value" type="checkbox"> Post To Blogs</p><p><input variable="#article" fillwith="value" type="file"> Article</p> </body></html> Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 15, 2012 Report Share Posted November 15, 2012 The problem is you have that runscript in there and you have to defind a command in this case change settings post this code in a new tab and you will see your ui code works as long as the command is defined: ui html panel("<html> <head> <meta content=\"text/html; charset=ISO-8859-1\" http-equiv=\"content-type\"> <title>gui</title> <script type=\"text/javascript\"> window.onload = ubot.runScript(\'change settings()\') </script> </head> <body> <p>Keyword: <input variable=\"#keyword\" fillwith=\"value\" type=\"placeholder\"> Keyword</p> <p><input variable=\"#posttoblogs\" fillwith=\"value\" type=\"checkbox\"> Post To Blogs</p> <p><input variable=\"#article\" fillwith=\"value\" type=\"file\"> Article</p> </body> </html> ", 150) define change settings { navigate("http://yahoo.com", "Wait") } 1 Quote Link to post Share on other sites
AutomationNinja 194 Posted November 15, 2012 Author Report Share Posted November 15, 2012 All-righty. Thanks! Sure having fun with this. Learning lots. Quote Link to post Share on other sites
AutomationNinja 194 Posted November 15, 2012 Author Report Share Posted November 15, 2012 what is the / for? Quote Link to post Share on other sites
AutomationNinja 194 Posted November 15, 2012 Author Report Share Posted November 15, 2012 This no worky for me ui html panel("<html><head><meta content=\"text/html; charset=ISO-8859-1\"http-equiv=\"content-type\"><title>gui</title><script type=\"text/javascript\">window.onload = ubot.runScript(\'change settings()\')</script></head><body> <p><input variable=\"#posttoblogs\" fillwith=\"value\" type=\"checkbox\"> CreateANew Hotmail Account</p> <button style=\"font-size: 36px; color: #00F; font-family: Arial, Helvetica, sans-serif;\" onclick=\"ubot.runScript(\'search()\')\">GO!</button></body></html> ", 500)define change settings { navigate("http://yahoo.com", "Wait")}comment("Post To Blogs")if($both(#posttoblogs, $true)) { then { alert("yo yo yo") } else { }} Can't see to figure it out.... Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 15, 2012 Report Share Posted November 15, 2012 Fixed: ui html panel("<html> <head> <meta content=\"text/html; charset=ISO-8859-1\" http-equiv=\"content-type\"> <title>gui</title> <script type=\"text/javascript\"> window.onload = ubot.runScript(\'change settings()\') </script> </head> <body> <p><input variable=\"#posttoblogs\" fillwith=\"checked\" type=\"checkbox\"> Create A New Hotmail Account</p> <button style=\"font-size: 36px; color: #00F; font-family: Arial, Helvetica, sans-serif;\" onclick=\"ubot.runScript(\'search()\')\">GO!</button> </body> </html> ", 500) define change settings { navigate("http://yahoo.com", "Wait") } comment("Post To Blogs") define search { if($comparison(#posttoblogs, "=", "true")) { then { alert("yo yo yo") } else { } } } Quote Link to post Share on other sites
AutomationNinja 194 Posted November 15, 2012 Author Report Share Posted November 15, 2012 Nice. Love you guys! P.S. I just started reading up on java script. Getting to learn the basics now. 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.