Jump to content
UBot Underground

Check Boxes / Variables / Conditions


Recommended Posts

I am trying to set my bot up to check a check box only if my checkbox UI is checked. So the bot would see if the UI checkbox is checked and if it is it would check the box on the page.

 

I can get my bot to select the box just fine so I just need to implement a statement to check if the UI box is checked. I have tried an IF THEN ELSE statement but I'm not positive on how to get it to work.

 

My idea is a simple statement to check the variable value (if its checked or not, 1 or 0, right?) I tried eval and that didn't work. I checked tutorials and I can't seem to find the answer.

 

 

also a question that is not as important right now but would help. How does one go about making a text box (large, to fit say a blog post) in the program that accepts spin format and then would spin it and place it on a text box in a web page? If that's already in a tutorial just link me because I can't seem to find it.

Link to post
Share on other sites

I bet the problem you're having is that values are not 0 or 1 in UBot, they are True or False (True or not really). Note also they seem to be CaSe SenSiTIve.

 

So, evaluate if $var = True and life should be good.

 

Jonathan

Link to post
Share on other sites

If the check box never clicked, the value is NOT True or False, but NIL, so you have to insert this code :

http://img27.imageshack.us/img27/2739/checked.jpg

Link to post
Share on other sites

Yeah this is why I generally only test for True... if it's not True, then it's not checked by definition. I never bother setting it to false since True/False is only a binary response anyway, so True/Not True works just as well.

 

Jonathan

Link to post
Share on other sites

I ended up going with what I have attached. Combination of all your advice and I also saw it in ubot tutorial 6, 14 minutes 24 seconds into the video. Seth had what I needed in the background. He doesn't seem to talk about it but has it on the screen. funny.

 

I didn't need to check if its nil. I tried adding that and it just made the code more complicated and it works without it. Thanks though.

 

Now onto text box with spin. :)

post-965-12783002639087_thumb.jpg

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