CyberSlug Posted February 3, 2004 Share Posted February 3, 2004 (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. 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.92Also, with AutoIt 3.0.92, ControlLeftClick("Page Setup","", "L&anscape") fails. Is this because the control is within a frame?===========ignore======= Edited February 3, 2004 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! Link to comment Share on other sites More sharing options...
scriptkitty Posted February 3, 2004 Share Posted February 3, 2004 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. Link to comment Share on other sites More sharing options...
trids Posted February 3, 2004 Share Posted February 3, 2004 Why is the text field necessary for checkboxesCan'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 .. I'll feedback here when I've had a chance to try the text parameter on those weird checkboxes. Link to comment Share on other sites More sharing options...
CyberSlug Posted February 3, 2004 Author Share Posted February 3, 2004 Hmm, now it works for me, too. I swear tried that script three times with success as indicated.... Must be time for bed Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
CyberSlug Posted February 3, 2004 Author Share Posted February 3, 2004 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! Link to comment Share on other sites More sharing options...
trids Posted February 3, 2004 Share Posted February 3, 2004 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 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) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now