Jump to content

Recommended Posts

Posted

Hi

I am using AutoIt to test an application developed in Delphi using Developer Express VCL Components.

I need to check/uncheck a TcxCheckBox and read whether it is checked/unchecked.

The standard VCL TCheckBox can be set using:

ControlCommand($win, "", $ctrl, "Check") / ControlCommand($win, "", $ctrl, "UnCheck")

and read by

$res = ControlCommand($win, "", $ctrl, "isChecked")

But this does not work with TcxCheckBox.

I can toggle between checked/unchecked with

ControlSend($win, "", $ctrl, "{SPACE}")

but I have not found a way to read the checked state.

Do you have some suggestions / hints?

Thanks

Dennis Christensen

Posted

Some controls will resist automation unless they are the active window.

Use the WinActive() function to force the control's window to the top before using ControlCommand() on these controls

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted

Hi

<Use the WinActive() function to force the control's window to the top before using ControlCommand() on these controls

Thanks.

Unfortunately this is not enough.

I tried testing a bit more.

The AutoIt ControlCommand function sends BM_GETSTATE and BM_SETSTATE messages to the CheckBox, but the DevExpress TcxCheckBox does not seem to respond to them (the standard Delphi TCheckBox does).

Any ideas?

Best regards

Dennis

Posted

Hi All

I cannot think of anything else than taking a screendump of the TcxCheckbox and compare it to known dumps of how it looks when checked and not checked.

Can you think of anything else?

Is there a codesnippet somewhere showing how to do it in AutoIt?

Best regards

Dennis

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
  • Recently Browsing   0 members

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