"Activate specific window" function with window name just cycles through all windows

Hello, want to quickly start off by saying thank you. BTT has been a really awesome tool I've been using for many years now.


Describe the bug
I am trying use the "Activate specific window" function. Here is a test setup:

  1. create a chrome window, set the name to "Test1" (this will be a window name prefix)
  2. create a second chrome window, set the name to "Test2"
  3. create a BTT action for "Activate specific window," set the App name to "Chrome" and the Window Title to "^Test1.*"
  4. create a second BTT action that is the same as the first but with the Window Title as "^Test2.*"

What I would expect when I use these 2 actions is that the correct window will just be pulled up to the front, but instead it looks like we are cycling through all the windows and activating each one. We always end up with the same window at the top after the sequence runs, regardless of the Window name.


Device information:

  • Type of Mac: Macbook Pro 16-inch, 2021
  • macOS version: Sonoma 14.3
  • BetterTouchTool version: 4.537

what exactly do you mean by second BTT action? (if you assign multiple actions to a trigger in BTT, BTT will execute them in sequence so that would explain your behavior)

I just tried your example, but it seems to work fine here.

By second action, I meant a separate action. Sorry about the miscommunication.

I recorded a short video to demonstrate what I am seeing. In the video, I show 2 separate actions, one to bring Test1 forward and one to bring Test2 forward. When you see the flicker, I am alternating between the actions.

Ah maybe the issue is that the Chrome app (at least on my machine) is called "Google Chrome", not just Chrome.

Hm I've been using the information that's surfaced in the "Restore Window Layout" action and this is what I see for this window:

 {
        "size": "{944, 1079}",
        "windowName": "Test1 - Google Chrome - Gordon (Personal)",
        "parentTitle": "Chrome",
        "position": "{-0, 38}",
        "role": "AXWindow"
    }

I did try using Google Chrome for the app name however and had the same behavior. It seems like a problem with the Window Name selection rather than the app, I also tried removing the app name and the cycling behavior extended to all open windows rather than just the chrome windows.

Strange, it all seems to work fine here. I tried to name the windows the same way you do, but the window's are activating fine.

The app name should be whatever is shown in activity monitor.

I wonder whether it's an issue with macOS 14.3 (I'm on 14.4 and 14.5)

I tried upgrading to macOS 14.5, still seeing the same issue. It looks like the action is cycling through and activating every open Chrome window.

What are some good next steps to debug the issue?

ah one idea, does your BTT have the „screen recording“ permission in system settings -> security & privacy? (unfortunately that is needed to access window titles in a performant way)

Ah, that does indeed work.

Having said that, it does feel uncomfortable to have the screen recording permission on. Can you share some more details about why that's necessary and how the functionality actually works? Any potential workarounds?

no workarounds, the permission is just really bad. BTT can actually record your screen without that permission, also it can access anything on your screen via the accessibility api (unfortunately accessing the window titles like this would be too slow). That info might not make you more comfortable, but hopefully highlights that the screen recording permission just gives a false sense of security.

See https://folivora.ai/blog/post/13011

Appreciate the response. The full write up helps to explain why it works this way.