Skip to content

Fussy window name matching #237

Open

Description

@Gikkman

Is your feature request related to a problem? Please describe.
I've noticed that the Window Name matching function only matches exact window names. Unfortunately, OBS has its' version included in the window name, so whenever OBS updates, the window matching fails and we need to re-do it by hand.

Describe the solution you'd like
I would like the window matching to be a bit more fuzzy. If it cannot find the exact window name, instead calculate the Levenshtein distance to all other windows and pick the one that is the closest.

Describe alternatives you've considered
Alternatively, you could instantly bring up the "match window" function if no window matches. Though, I guess it could create problems if you start AutoSplit before the captured program. Though, the same is true for my suggested solution.

Another idea could be to allow patterns in the window name. So say you match against the string:
OBS * (64-bit, windows) - Portable Mode - Profile: Gikkman - Scenes: Scenes

Activity

  1. added
    enhancement
    on May 18, 2023
  2. Avasam commented on May 18, 2023

    @Avasam
    Collaborator

    Sounds reasonable. My only concern is when the window you want to target isn't already open, there should probably be some sort of threshold on the match. Otherwise I'd have to add constant checking (which could be done after #219 ). Maybe I could test with common use-cases like OBS and some emulators.

  3. Gikkman commented on May 24, 2023

    @Gikkman
    ContributorAuthor

    You raise a good point about the window not even being open. For an initial implementation, I would probably set a distance threshold, and if nothing is found within the threshold, just leave the match window blank (like it is today).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions