Sign in to follow this  
Followers 0
CyberSlug

Problems With Checkboxes

6 posts in this topic

#1 ·  Posted (edited)

EDIT: NEVERMIND! I searched the forum and found this which said to fill in the text field....

NEW QUESTION: Why is the text field necessary for checkboxes???

======ignore=================

Has anyone had success with Check, UnCheck, and IsChecked control commands??

I cannot find any checkboxes on which ControlCommand("title", "text", "classnameNN", "Check", "") has any affect. :whistle: As far as I can tell, the checkboxes I want are the "normal" versions of the control.

Sample script that attempts to choose Landscape orientation in Notepad's Print Setup dialog.

Run("notepad")
WinWaitActive("Untitled - Notepad")
WinMenuSelectItem("","", "&File", "Page Set&up...")
WinWaitActive("Page Setup")


MsgBox(4096,"","Try ControlCommand...");doesn't work
WinWaitActive("Page Setup")
ControlCommand("","", "Button4", "Check", "")

MsgBox(4096,"","Try ControlSend...")   ;doesn't work
WinWaitActive("Page Setup")
ControlSend("Page Setup","", "Button4", "{+}")


MsgBox(4096,"","Try ControlLeftClick...") ;works!
WinWaitActive("Page Setup")
ControlLeftClick("Page Setup","", "Button4")

Windows XP sp1, with AutoIt 3.0.91 and 3.0.92

Also, with AutoIt 3.0.92, ControlLeftClick("Page Setup","", "L&anscape") fails. Is this because the control is within a frame?

===========ignore=======

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites



ControlCommand("","", "Button4", "Check", "")
works fine in Win2000, as well as the controlleftclick, I will give some other versions a try for compatibility


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Why is the text field necessary for checkboxes

Can't say for sure, but perhaps it addresses the problem of non-standard checkboxes. I know I didn't try that as an option when I coded the workaround :whistle: .. I'll feedback here when I've had a chance to try the text parameter on those weird checkboxes.

Share this post


Link to post
Share on other sites

For what it's worth, the AutoIt spy thingy says all the checkboxes I was trying were "Button" class. (Larry's said commandControl should work with these)

I also know checkboxes in Visual Basic 6 forms tend to be class "ThunderRT6CheckBox" or "ThunderRT6OptionButton"


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Ok ... my weird "checkboxes" are actually subclassed listitems in a SysListView321 control .. which explains my mystery. So I guess even the text parameter won't help in this scenario, and I'll have to stick with my workaround :whistle:

If anyone has Mcaffee installed .. run the mcconsol.exe, and see the Tools > Edit AutoUpdate Repository List dialog.

We'd probably have the same sort of hassle with ListBoxes that have the checkbox style set (I think VB's Project > References is one of these)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0