Jump to content

Non-standard Control Manipulation


Specs
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...