Specs Posted February 17, 2010 Share Posted February 17, 2010 (edited) I'm using AutoIt to automate a medical application on Windows. The application uses some non-standard controls, look at this: http://www.devexpress.com/Products/VCL/ExForumLibrary/index.xml I'm trying to check or uncheck checkbox controls (class: TdxfCheckBox), but it's not working. Using ControlCommand($medicalfundaa_options_window_handle, "", "[CLASS:TdxfCheckBox; INSTANCE:6]", "Check", "") will both check and uncheck the checkbox, depending on whether it was checked or unchecked to start off with. Using "UnCheck" doesn't do anything at all... ControlGetText($medicalfundaa_options_window_handle, "", "[CLASS:TdxfCheckBox; INSTANCE:6]") actually returns the checkbox's label however, so it can interact with it on some level. Obviously the control state is where the problem lies... Really frustrating, is there ANY way of manipulating this control successfully? Any advice would be great! Thanks! Edited February 17, 2010 by Specs Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 17, 2010 Moderators Share Posted February 17, 2010 Specs,If you can interact with the control using ControlCommand - "Check", can you get a sensible reply from the "IsChecked" command? Then you would know the current state and whether you needed to unleash the all-powerful "Check" command on the poor unsuspecting control. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Specs Posted February 17, 2010 Author Share Posted February 17, 2010 (edited) Melba23, thanks for the reply. Tried that as well, no luck (always returns 0 with "IsChecked", whether checked or not). I assume that's why only "Check" works, because it always thinks it's not checked. Any other ideas? Nothing in Windows API that could work or something? Thanks! Edited February 17, 2010 by Specs Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 17, 2010 Moderators Share Posted February 17, 2010 (edited) Specs,Looks like you might have to fall back on PixelChecksum and MouseClick! Does the checkbox always appear at the same place in the window and can you toggle it with a normal mouse click?M23Edit: Typnig - I must learn to touch-type one of these days! Edited February 17, 2010 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Specs Posted February 17, 2010 Author Share Posted February 17, 2010 Thanks Melba! I actually came up with the idea of using "PixelGetColor" and if it's not white (FFFFFF) it should toggle it. This comes down to pretty much what you've suggested... Oh well, it works, not elegant, but it works! Already walked straight into my next issue! Maybe you have some idea for this? Also need to see what items are checked in a CheckListBox. With all the commands, real easy to get SELECTED items, but not CHECKED items! And obviously any commands used for checkboxes are useless, since it's many items in a listbox. Read all the posts in this forum that are related to CheckListBox's, but none of them ever mention a solution... Any help please?! Thanks! 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