Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
regex case insensitive search for accessible object
#1
I have an application window that has a LOT of navigation tabs.  In some cases, there are upward of 300 tabs.  I wrote a macro that'll prompt for a search string and it'll locate and activate the proper tab.  However, it only works when the search text is case sensitive matched.  I'm having trouble figuring out how to format the regex to get it to ignore case.

This works:

Acc a.Find(w "PAGETAB" F"*{_layer}*" "class=SysTabControl32" 0x1035); err mes- "Can't Find Layer"

I know that it needs to be flags 1036 for regex, I tried:

Acc a.Find(w "PAGETAB" F".*{_layer}.*/i" "class=SysTabControl32" 0x1036); err mes- "Can't Find Layer"

That did not work.  Is there a "flag" for case insensitive matching in the Acc Find method?

Thanks,
Dave
#2
Actually it seems the * search is working case insensitive. I swore it wasn’t yesterday but I could blame sleep deprivation. Would still be interested in the regex option for case insensitive if there is one.
#3
(?i) is regex for case insensitive

read more in qm help
https://www.quickmacros.com/help/Functions/IDP_ACC.html
#4
Thanks again Kevin!

And my bad on the RTFM overlook.  I apologize, it was RIGHT there.


Forum Jump:


Users browsing this thread: 1 Guest(s)