Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Accessible object, mouse trigger
#1
Hi,
Using the following code, can identify the contents of the accessible object
Code:
Copy      Help
int w=win("SAPIEN PowerShell Studio 2022" "")
Acc a.Find(w "CLIENT" "" "class=*.Window.*[]wfName=textScript" 0x1004)
str name=a.Name
out name
I have to use the prop parameter("class=*.Window.*[]wfName=textScript") for it to work
byte  Find(`hwnd $role [$name] [$prop] [flags] [^waits] [matchIndex] [$navig] [*cbFunc] [cbParam])

But in the acctest function, there is no prop argument, so the following filter function does not work
Is there any other way to solve this problem?

Thank you in advance for any advice and help
david

Function FFC_PS_Editor
 
Code:
Copy      Help
;/
function# iid FILTER&f

if(!wintest(f.hwnd "SAPIEN PowerShell Studio 2022" "")) ret
Acc a=acc(mouse)
if(a.a and acctest(a "" "CLIENT" 0 "*.Window.*" "" 4)) ret iid
ret -2

Menu Left_dou
Trigger ##L //FFC_PS_Editor     Help - how to add the trigger to the macro
Code:
Copy      Help
test :mes "hello" * findacc.ico
#2
acctest should support wfName in parameter value when with flag 0x4000.

Better use child, it supports wfName too. In dialog "Find window or control" capture the control, check Control, click Edit. There you'll find wfName.
#3
0x4000  or  0x400
There is no 0x4000 in the function help information below

int acctest(Acc'object $name [$role] [window_] [$class_] [$value] [flags] [x y])   ;;flags: 1 name with *, 2 name regexp, 4 value with *, 8 value regexp, 16 +invisible, 32 +useless, 64 direct child, 0x100 client, 0x200 screen, 0x400 description, 0x800 state, 0x8000 callback.

The following two codes have no effect
Code:
Copy      Help
if(a.a and acctest(a "" "CLIENT" 0 "*.Window.*" "wfName=textScript" 0x4004)) ret iid
if(a.a and acctest(a "" "CLIENT" 0 "*.Window.*" "wfName=textScript" 0x404)) ret iid
#4
The flag is documented in the help file.

If does not work (should work, I tested now), use childtest.
#5
Thanks for your help,

childtest works, 

acctest does not work anyway in the Filter function,  
But testing the code directly is working  

acctest is useful because sometimes only ACC objects can be used
#6
In filter functions acc functions often don't work, it's a known problem.


Forum Jump:


Users browsing this thread: 1 Guest(s)