Sign in to follow this  
Followers 0
Specs

Non-standard Control Manipulation

5 posts in this topic

#1 ·  Posted (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 by Specs

Share this post


Link to post
Share on other sites



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

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by Specs

Share this post


Link to post
Share on other sites

#4 ·  Posted (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?

M23

Edit: Typnig - I must learn to touch-type one of these days! :mellow:

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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! :mellow:

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! :lol:

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!

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