Can BTT control where an app's child window opens?

I use my laptop screen for the email app and when I open an email, it opens up on the laptop screen.

Then I'll drag it to my monitor to read it.

Is there a way for BTT to have the email window open on the monitor instead of the laptop screen?

It feels like something BTT can do, but if not, open to exploring another app too.

Bump!

You can make that happen by using the command "Create conditional activation group."
Here's an example with Outlook.
The main Outlook window has the Focused Element Role: AXTable.
An Outlook email window has the Focused Element Role: AXWebArea.

You can check this in the Conditional Activation Group (CAG). Create the rule in the CAG and then trigger "Move Window to Next Monitor"

Bildschirmfoto von Microsoft Outlook (04-12-23, 15-35-50)

Bildschirmfoto von Microsoft Outlook (04-12-23, 15-36-21)

Bildschirmfoto von BetterTouchTool (04-12-23, 15-46-07)

1 Like

Hi @SLE thank you so much for your detailed instructions!

I managed to create the Conditional Activation Group I think, with the instructions here. It appears like an app on the sidebar.

How do I get to this:

Is this trigger attached to the newly created CAG or to the original app? What's the name of the trigger, I can't find a CAG related trigger in the list.

Sorry in advance, I haven't used BTT at this advanced level. ::

No problem. You've named the CAG group. In my case, it's called "Outlook-MAIL WINDOWS."

When you click on the app in the sidebar, choose the "Conditional Activation Group Activated" trigger under "Groups & Top Level Triggers."

Enter the name you gave the CAG group under "Conditional Activation Group Name."

Then, assign the desired action under "Actions Assigned to..."

There might be another way, but so far, this method has always worked well for me.

1 Like

Maybe I've set up the CAG wrongly?

It's somewhat working:

This is kinda working because the HUD "TEST" shows up on screen.

I did something wrong somewhere cos when I click on the Preview Pane in the Sparks app, the entire app moves to the second screen.

And the position isn't centered on the second screen, but somewhat top left corner (but not exactly in the corner).

You want to open an email you received in Spark and move the newly opened window, right? Open the email while the BTT config is running and check which Focused Element Role is active. In this case, with Spark, it's labeled as "AXWindow." BTT confirms it by turning green, as shown in the screenshot.

1 Like

@SLE Got it working!!

Oddly, I had to add one more condition:

I found using move & resize a bit unpredictable so I used "trigger snap" area instead because I already a snap area I can use.

THANK YOU!!!

I'm now trying to replicate this with Mimestream, but I can't seem to find the right element to target.

Both main window and child window (when I double click to open an email) have "AXTable" for Focused "Element Role."

Urgh, update: Not only does it work for the child window, when I cmd+tab to Spark, it does the same thing to the main Spark app window.

This also causes the Spark main window to move when I cmd+tab to it.

You need to narrow it down more. Always look at the "Current Condition Values" and choose what makes the windows you want stand out.
Try this.

Bildschirmfoto von BetterTouchTool (08-12-23, 10-48-45)

or this

Bildschirmfoto von BetterTouchTool (08-12-23, 11-05-42)

It varies from app to app, and there's no one-size-fits-all solution. You'll need to try things out.

1 Like

Thank you for your patience with this! I tried implementing your suggestion to exclude the window title.

The problem appears when I'm doing a CMD+TAB back to Spark. It happens really quickly and I had to do a screen recording to capture the current condition values.

So this is odd:

image

The window title in that screen grab, shows my Firefox window title, which is the previous app in focus before I CMD+TAB to Spark.

So excluding Spark's window title didn't work.

Plus, the focused element and subrole keeps changing. You can see the values there are supposed to target the child window—this appears when I CMD+TAB. Not when Spark is "static".

These are the conditions when the Spark app window is where it should be:

image

It only happens when the focus goes from Firefox to Spark. Switching from other apps to Spark is fine.

Maybe this is a bug?