Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Firefox reverse find acc object
#1
Hello,

I used the find acc obj wizard to look for the "Phrase not found" when doing a find within firefox. Without reverse order it takes around 7000ms. With reverse order, it takes 100ms. During testing inside the wizard, I get good speeds. Once I run the macro, it reverts to normal searching (without reverse order).

Here's what I'm looking for
[Image: 2QRkYWi.png]

Thanks for reading.
#2
Please post the code that the dialog creates.

This code works as expected:
Macro Macro2753
Code:
Copy      Help
int w=win(" - Mozilla Firefox" "MozillaWindowClass")
PerfFirst
Acc a.Find(w "TEXT" "Phrase not found" "state=0x0 0x20000040" 0x1085) ;;52 ms with the Reverse flag
;Acc a.Find(w "TEXT" "Phrase not found" "state=0x0 0x20000040" 0x1005) ;;630 ms without the flag
PerfNext
PerfOut

Often the dialog finds faster than the code because, while the dialog is open, all Firefox accessible objects are created (when retrieving the object tree) and alive.
#3
That code didn't work, but I found perf very useful. I used the perf first and next functions to calculate how long the operation took. If it was fast enough then my macro would perform the next step. If it took too long then I interpreted the event as a fail like "failed to find object".


Forum Jump:


Users browsing this thread: 1 Guest(s)