Jump to content
UBot Underground

Error: The given key was not present in the dictionary.


Recommended Posts

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>

Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

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

if($both(#posttoblogs, $true)) {

then {

alert("yo yo yo")

}

else {

}

}

 

Can't see to figure it out.... :(

Link to post
Share on other sites

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 {
       }
   }
}

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