Skip to content

Change capture window of Window Capture source

WarmUpTill edited this page Feb 24, 2024 · 1 revision

This example will provide you with a macro which automatically changes the settings of a Window Capture source to capture the focus window.
This will only work on Windows.

The Window Capture source stores the information about which window to capture based on a combination of the title of the window to capture, the process name, and also the window class. So for example, this [powershell.exe]: Window PowerShell value in the settings dialog of the Window capture source ...

1705172451440

... is represented by the string Windows PowerShell:ConsoleWindowClass:powershell.exe in the settings.

You can test this by clicking the "Get current settings" button in the "Source" source while a Window Capture source is currently capturing a window:

1705172563229

So you will have to create a macro, which has a Window and Process condition, to get the window title, window class, and process name.
Those values will have to be assigned to variables and combined to match the format expected by the Window Capture source.
Finally you can set the setting named Window to the constructed string using the "Source" action.

1705174779687

If you want to import the example you can use this code to do so: Code:

AAATMnic7Vhbb9s2FP4rBLGHrbM9y2vSzm+Z4WAGmsWI0/RhCAZaoiUiFCmQVOrO0H/f4UW0lMRZthZ5GPxgQDp3nu87pKkdLkmqpMbTP3ZYkJLiKT6rjURpQURO0WcmMvkZpaQyNUUbmdY6yPAAV6TW4LAhXFP7pgjnlEeBFDMXBE+NquFd37FqvqXppVgZoky0y5Wsq/iWyfRuRY1hIoeqdljRnGlDVTQoiL6qxa+1MVK0oUG2tMU8kkImU+sPZN2pq2B5weFnFpuZFBkzTAp9DR7RQrXxr+kW6sSQr11uT+5ygqYWj3UfvQy0aS+JrygY7fMjoiiyZY96Hue2oOdcXMUj3Aw8kGepVUWbVcWZgeYtpXbvDubKwp2cvGsG4fn9eNzchgBzCOeDHPZ9dzqJvs6zxeg3ae7oF92hBHTAC8H7NjaqKzIyzzldPhTvW+DyppJzUmmatdgyeMKRiVzmLIVigD61ItbtQmZswyxtdtiwkv4JAbVRhAnj7DS1GRzD7gm32MeH8Qj05ktlHxtbM/Mu91Rp14ekAXFa0PTumhke+R2qmeLRG9y+XdGcbgGODcttBirIeu8AE2MY6QxMFRZs025qznWqKBVRX5ItK9lftglB4gayn//civzgxWa5Wj85tWdRcDeeUtg/Hah1P96+WB+y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