Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DoDefaultAction
#1
I am having trouble making the default action (Push) work on a push button control when accessed using the "acc" function via navigation.

Acc a=acc(FLD_NAME "CLIENT" WIN_TITLE WINDOW_CLASS "" 0x1001 0 0 "c1")
a.DoDefaultAction()

Is there something I'm doing wrong using the navigation method of finding a pushbutton control. I know the DoDefaultAction works when I locate a checkbox using the just the name of it. Unfortunately, the pushbutton caption is the same as several other pushbutton captions, so I have to use the indirect method of navigation to get access to it.

The problem is the a.DoDefaultAction() doesn't do anything. I have printed the a.Name() to verify I have the correct control.

Help!


MSDN Accessibility indicates:
Quote:Push Button

A push button is a small, rectangular object used to perform an action. For example, the OK and Cancel buttons on a dialog box are push buttons.

The window class name for a push button is "BUTTON".
Supported Properties and Methods
accHitTest
accDoDefaultAction
The DoDefaultAction method clicks the push button.
....

Thanks for your help. QM is really a great tool!

John


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)