Jump to content
UBot Underground

How Do I Check All UI CheckBoxes


Recommended Posts

Hello,

 

Creating a pr bot that will sign up and submit to about 20 sites. It has all the sites using a check box method, so when checked it will create an account or submit to that site.

 

So my question is how to add a ui button that says select all. Then when that button is pushed it will automatically check all of the ui check boxes.

 

Is there a way this can be accomplished?

 

Thanks in advance,

Justin

Link to post
Share on other sites

How does this work for you?

 

ui html panel("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">

<html xmlns=\"http://www.w3.org/1999/xhtml\">

 

<head>

<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\" />

<title>Untitled 1</title>

<script LANGUAGE=\"JavaScript\">

<!--

// by Nannette Thacker

// http://www.shiningstar.net

// This script checks and unchecks boxes on a form

// Checks and unchecks unlimited number in the group...

// Pass the Checkbox group name...

// call buttons as so:

// <input type=button name=\"CheckAll\" value=\"Check All\"

//onClick=\"checkAll(document.myform.list)\">

// <input type=button name=\"UnCheckAll\" value=\"Uncheck All\"

//onClick=\"uncheckAll(document.myform.list)\">

// -->

 

<!-- Begin

function checkAll(field)

\{

for (i = 0; i < field.length; i++)

field.checked = true ;

\}

 

function uncheckAll(field)

\{

for (i = 0; i < field.length; i++)

field.checked = false ;

\}

// End -->

</script>

 

</head>

 

<body>

<form name=\"myform\" action=\"checkboxes.asp\" method=\"post\">

<b>Your Favorite Fruits</b><br>

<input type=\"checkbox\" name=\"list\" value=\"1\">Apples<br>

<input type=\"checkbox\" name=\"list\" value=\"2\">Bananas<br>

<input type=\"checkbox\" name=\"list\" value=\"3\">Oranges<br>

<input type=\"checkbox\" name=\"list\" value=\"4\">Lemons<br>

<input type=\"checkbox\" name=\"list\" value=\"5\">Coconuts<br>

 

<input type=\"button\" name=\"CheckAll\" value=\"Check All\"

onClick=\"checkAll(document.myform.list)\">

<input type=\"button\" name=\"UnCheckAll\" value=\"Uncheck All\"

onClick=\"uncheckAll(document.myform.list)\">

<br>

</form>

</body>

 

</html>

", 160)

 

 

(Taken from an internet example, let me know if you want the url)

 

John

Link to post
Share on other sites

Hmmm...I thought you had a dev license...I'll see if I can work it into pro...

 

http://screencast.com/t/YqkD4UJB6sy

 

 

John

 

Hey John,

 

Very interested in gettting the dev license. But until I can get all the bugs worked out of my current bots it isn't feasible right now.

 

I know you are working with me to help work out the bugs and it's greatly appreciated. :)

 

Checking out the tutorial now.

 

Edit - Seems the tutorial is for the example above. Looking forward to a solution in pro

Link to post
Share on other sites

You can create a UIbutton that will set all the uicheckboxes into checked.. Name it for example "Select All".

 

That's exactly what I am trying to accomplish, care to elaborate a little more. Would be greatly appreciated.

Link to post
Share on other sites

Here's the code for you to check. This will select/deselect the checkboxes

 

ui button("Select All/Deselect All") {
   if($comparison(#checkbox1, "=", "true")) {
       then {
           set(#checkbox1, "", "Global")
           set(#checkbox2, "", "Global")
       }
       else {
           set(#checkbox1, "true", "Global")
           set(#checkbox2, "true", "Global")
       }
   }
}
ui check box("checkbox1", #checkbox1)
ui check box("checkbox2", #checkbox2)

  • Like 1
Link to post
Share on other sites

here is another example:

 

ui check box("I Am male", #male)

ui check box("I Am Female", #female)

ui check box("I Am Just Weird", #weird)

ui button("Check All") {

checked()

}

ui button("Uncheck") {

unchecked()

}

define checked {

set(#male, "true", "Global")

set(#female, "true", "Global")

set(#weird, "true", "Global")

}

define unchecked {

set(#male, "false", "Global")

set(#female, "false", "Global")

set(#weird, "false", "Global")

}

 

 

John

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