Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fussy window name matching #237

Open
Gikkman opened this issue May 18, 2023 · 2 comments
Open

Fussy window name matching #237

Gikkman opened this issue May 18, 2023 · 2 comments
Labels
enhancement New feature or enhancement request

Comments

@Gikkman
Copy link
Contributor

Gikkman commented May 18, 2023

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

@Gikkman Gikkman added the enhancement New feature or enhancement request label May 18, 2023
@Avasam
Copy link
Collaborator

Avasam commented May 18, 2023

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.

@Gikkman
Copy link
Contributor Author

Gikkman commented May 24, 2023

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
Labels
enhancement New feature or enhancement request
Projects
None yet
Development

No branches or pull requests

2 participants