Skip to content

Some ideas #4

Description

@sancarn

Hey,

Found this library, cool stuff and glad my name made it into the commentry! haha

I don't really code in AHK anymore, but I did port everything to VBA

Some of your features are super cool, and I don't fully understand, and also you are missing some features too.

Missing Features

  1. Many Acc Elements implement IAccIdentity interface, which has a GetIdentityString(). This can be useful if you're building a treeview or something. Not all elements do implement this, but it still can be useful.
  2. FindElement could probably use a DepthFirstSearch vs BredthFirstSearch param.
  3. With FindElement and FindElements I find that sometimes you can discount whole trees worth of elements to increase the performance of a search. I'm not 100% sure how these functions work, and I can't remember if you have callbacks in AHK, but if you do it might be worth concidering the below:
;Excuse my ahk code, i am very rusty!

cbFindElement(element) {
  if(element.class=="Bollib"){
    ;If we know we don't have to search the descendents
    return Acc.FilterResult.SkipDescendents
  } else if element.name == "Something" {
    ;If we get so far that we can guarantee the element is not in the tree
    return Acc.FilterResult.NoMatchCancelSearch
  } else if element.name == "Whatever" {
    ;Found, don't search decendents
    return Acc.FilterResult.MatchFound
  } else if element.name == "Podrick" {
    ;Found, but child tree could also contain matches...
    return Acc.FilterResult.MatchFoundSearchDescendents
  }
}

el = acc.FindElements(cbFindElement)

This gives significantly finer control over the search process :) Here are my own implementations for FindAll and FindFirst if you wanted to add these to your own library 😄 .


Questions

Onto the things I don't understand. Your ActivateChromiumAccessibility function - Does this, rather, obtain the IAccessible of chromium if it is active? Or will it actually obtain IAccessible of chromium even if accessibility is not enabled?

At work we usually launch chrome with --force-renderer-accessibility command line flag, because the accessibility is disabled by default. But would sending WM_GETOBJECT actually enable it for any arbitrary chrome window?!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions