Focus Application

Focus Application Window

This action brings a specific application window to the foreground on the machine running Grid Gateway.

Unlike starting or controlling applications, this action targets currently open windows. The window will be brought to the front and focused so it becomes the active window on the system.

To identify the correct window, the exact window title must be provided. The title must match the name shown in the Windows task switcher (Alt + Tab).

For example, instead of specifying just File Explorer, the full window title might be:

Home - File Explorer

Because window titles can change depending on the current view or document, it is important to use the exact title displayed by Windows.

Tip: The easiest way to identify the correct window title is to press Alt + Tab and read the title shown for the window you want to focus.


Run Console command to trigger powershell script to focus a application

Due to limitations in how Windows handles application focus, the method described above may not always work reliably in all situations. As an alternative, the Run Console Command action can be used to execute a script that attempts to bring an application to the foreground.

file-download
1KB
powershell -NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\focus app.ps1" -App explorer

In this example, -App explorer is used as the target application. Any other running application can be specified as well, such as UnrealEditor, slack, or other process names available on the system.

The value passed to -App must match the process name of the application.

Last updated