Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick macro behaviour using the accesible object property
#1
Hi,

Iam facing problem using Accesible object property...

Problem description:
I have a check box and two Edit box....
firstly i will tick the check box using the following command
Acc a=acc ("Continue" "CHECKBUTTON" "NorthWind" "WindowsForms10.EDIT.app3" "" 0x1001)
a.Mouse(1)

now i have to check whether the two edit boxes are enabled or not (initially bot the edit boxes will be disabled)

Acc a1=acc("START" "TEXT" "NorthWind" "WindowsForms10.EDIT.app3" "" 0x1801 0x0 0x20000040)
Acc a2=acc("STEP" "TEXT" "NorthWind" "WindowsForms10.EDIT.app3" "" 0x1801 0x0 0x20000040)
out a1.State()
out a2.State()
if both the edit box are enabled i should get output value 0

If iam executing these two scripts iam able to the output value as 0
where as if i execute these scripts together iam getting someother value...


can anyone help me on this...

Thanks In advance
Nithin
#2
Use STATE_SYSTEM_UNAVAILABLE flag. Even better, use DoDefaultAction instead of Mouse(1). If still does not work, insert some delay, eg 0.2, after a.Mouse or a.DoDefaultAction.

Example with QM Options dialog, Security tab, QM 2.1.8:
Code:
Copy      Help
act "Options"
spe

Acc a=acc("Mouse buttons" "CHECKBUTTON" "Options" "Button" "" 0x1001)
;a.Mouse(1)
a.DoDefaultAction

Acc a2=acc("Mouse drag" "CHECKBUTTON" "Options" "Button" "" 0x1001)
if(a2.State&STATE_SYSTEM_UNAVAILABLE) out "disabled"; else out "enabled"


Forum Jump:


Users browsing this thread: 1 Guest(s)