Windows Commands

Edit

Window: Find #

Searches for a window by title or process name and saves its window handle (HWND) into a variable.

Box Name Type Description
Search By Dropdown Whether to search by By Title (window title) or By Process Name (executable name, e.g. notepad.exe).
Input String The title or process name to search for. Partial matches are supported for title searches.
Save Variable As String Variable name to save the window handle (HWND) as a number.

The returned handle is a number (HWND) that uniquely identifies the window. Pass this handle to other Window commands instead of a title for more reliable targeting — especially useful when multiple windows have similar titles.

If no matching window is found, the saved value will be 0.

Window Handle vs. Title:

Input Type Example When to Use
Window Title Notepad Simple one-off commands. May be ambiguous if multiple windows share the title.
Window Handle Variable from Window: Find Reliable targeting, especially across multiple operations on the same window.

Example flow:

  1. Use Window: Find with “By Title” and "Notepad" → saves handle to myHandle
  2. Use Window: Minimize with /$myHandle$/ → minimizes that exact window


Edit

Window: Minimize #

Minimizes a window to the taskbar.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.

You can pass either a partial window title as a string, or a numeric window handle retrieved from the Window: Find command. Using a handle is more reliable when multiple windows share the same title.


Edit

Window: Maximize #

Maximizes a window to fill the screen.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.

You can pass either a partial window title as a string, or a numeric window handle retrieved from the Window: Find command. Using a handle is more reliable when multiple windows share the same title.


Edit

Window: Restore #

Restores a minimized or maximized window to its previous normal size and position.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.

You can pass either a partial window title as a string, or a numeric window handle retrieved from the Window: Find command. Using a handle is more reliable when multiple windows share the same title.


Edit

Window: Close #

Sends a close request to a window, equivalent to clicking the X button.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.

This sends a WM_CLOSE message to the window. Most applications will prompt to save unsaved work before closing. To force-terminate a process without a close dialog, use Process: Kill instead.

You can pass either a partial window title as a string, or a numeric window handle retrieved from the Window: Find command.


Edit

Window: Focus #

Brings a window to the foreground and gives it keyboard focus.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.

If the window is minimized, it will be restored before being focused. Useful for ensuring a specific application is in the foreground before sending keyboard input via Keyboard Simulate Press.

You can pass either a partial window title as a string, or a numeric window handle retrieved from the Window: Find command.


Edit

Window: Hide #

Hides a window from the screen and taskbar without closing it.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.

The application continues to run in the background. Use Window: Show to make it visible again. The window will not appear in the taskbar while hidden.

You can pass either a partial window title as a string, or a numeric window handle retrieved from the Window: Find command. Using a handle is recommended since the window cannot be located by title once hidden.


Edit

Window: Show #

Makes a previously hidden window visible again.

Box Name Type Description
Window (Title or Handle) String The window title or a window handle variable returned by Window: Find.

Restores the window to its normal state after it was hidden with Window: Hide. Use a window handle stored before hiding, since hidden windows cannot be found by title.


Edit

Window: Set Position #

Moves a window to the specified X/Y position on screen.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.
X Number The horizontal position in pixels from the left edge of the primary monitor.
Y Number The vertical position in pixels from the top edge of the primary monitor.

Position 0, 0 is the top-left corner of the primary monitor. Negative values or values beyond the screen resolution move the window off-screen or onto secondary monitors.

The window size is not changed, only its position.


Edit

Window: Set Size #

Resizes a window to the specified width and height in pixels.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.
Width Number The new width of the window in pixels.
Height Number The new height of the window in pixels.

The window position is not changed, only its size. Some applications enforce minimum or maximum sizes and may not honor all values.


Edit

Window: Get Info #

Retrieves the title, position, and size of a window and saves them as an object.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.
Save Variable As String Variable name to save the window info object.

Use Object Get Variable to read individual fields from the returned object.

Saved Payload:

Variable Name Type Description
title String The full title of the window.
x Number The X position of the window’s top-left corner in pixels.
y Number The Y position of the window’s top-left corner in pixels.
width Number The width of the window in pixels.
height Number The height of the window in pixels.

Example SAMMI Response Object:

{
  "title": "Untitled - Notepad",
  "x": 100,
  "y": 200,
  "width": 800,
  "height": 600
}


Edit

Window: Set Always On Top #

Enables, disables, or toggles the always-on-top state of a window.

Box Name Type Description
Window (Title or Handle) String The window title (e.g. Notepad) or a window handle variable returned by Window: Find.
Action Dropdown Enable to pin on top, Disable to unpin, or Toggle to switch the current state.

When set to always-on-top, the window stays visible above all other windows, including maximized ones. This is equivalent to right-clicking a window’s title bar in some apps and choosing “Always on Top”.


Edit

Window: Get Active #

Returns the title of the currently focused (active) window.

Box Name Type Description
Save Variable As String Variable name to save the active window title.

The saved value is the full window title string of whatever window currently has keyboard focus. Returns an empty string if no window is focused.

Useful for checking which application the user is currently in, or for branching logic based on what is active on screen.


Edit

Process: Is Running #

Checks whether a process with the given name is currently running and saves the result as a boolean.

Box Name Type Description
Process Name String The executable name of the process, including the .exe extension (e.g. notepad.exe).
Save Variable As String Variable name to save the result as a boolean (true or false).

The check is case-insensitive. Returns true if at least one instance of the process is running, false otherwise.

Saved Value:

Value Type Description
true Boolean The process is currently running.
false Boolean No process with that name was found.

Example: Check if OBS is running by entering obs64.exe as the process name.


Edit

Process: Kill #

Forcefully terminates a process by name or PID.

Box Name Type Description
Process Name or PID String The executable name (e.g. notepad.exe) or the numeric process ID (PID).

This immediately and forcefully kills the process — there is no save prompt. Use Window: Close if you want to give the application a chance to save before exiting.

If multiple processes share the same name, all matching instances will be terminated. Use a PID for precise targeting.

Example: Provide notepad.exe to kill all Notepad windows, or a specific PID like 1234 to target only one instance.


Edit

Process: Get List #

Returns an array of all currently running processes and saves it into a variable.

Box Name Type Description
Save Variable As String Variable name to save the process list array.

The saved value is an array of objects. Each object contains information about one running process. Use Array Get Variable or Object Get Variable to read individual fields.

Each array entry contains:

Variable Name Type Description
name String The executable name of the process (e.g. notepad.exe).
pid Number The numeric process ID (PID).

Example SAMMI Response:

[
  { "name": "notepad.exe", "pid": 1234 },
  { "name": "obs64.exe", "pid": 5678 }
]


Edit

System: Get Master Volume #

Returns the current Windows master volume level as a number between 0 and 100.

Box Name Type Description
Save Variable As String Variable name to save the current master volume level.

The saved value is the current system-wide master volume as an integer from 0 (muted/silent) to 100 (maximum).

This reads the Windows master volume, not the volume of a specific application. Use the OBS volume commands for OBS-specific audio control.


Edit

System: Set Master Volume #

Sets the Windows master volume level.

Box Name Type Description
Volume (0-100) Number The desired volume level. 0 is silent, 100 is maximum.

Values are clamped to the range 0–100. This changes the system-wide master volume and affects all audio output. Setting this does not affect the mute state — use System: Set Master Mute to control muting separately.


Edit

System: Get Master Mute #

Returns the current Windows master mute state as a boolean.

Box Name Type Description
Save Variable As String Variable name to save the mute state.

Saved Value:

Value Type Description
true Boolean The system audio is currently muted.
false Boolean The system audio is not muted.

This reads the Windows master mute state. Muting does not change the volume level — use System: Get Master Volume to check the current volume separately.


Edit

System: Set Master Mute #

Enables, disables, or toggles the Windows master mute state.

Box Name Type Description
Action Dropdown Enable to mute, Disable to unmute, or Toggle to switch the current state.

Muting does not affect the volume level. Use System: Set Master Volume to control volume separately.

Action Effect
Enable Mutes the system audio.
Disable Unmutes the system audio.
Toggle Switches between muted and unmuted.


Edit

System: Get Audio Devices #

Returns an array of all available Windows audio output device names.

Box Name Type Description
Save Variable As String Variable name to save the device list array.

The saved value is an array of strings, where each entry is the name of an available audio output device.

Example SAMMI Response:

[
  "Speakers (Realtek Audio)",
  "Headphones (USB Audio Device)",
  "HDMI Output (NVIDIA High Definition Audio)"
]


Edit

System: Set Application Audio Level #

Sets the audio volume (0–100) of a specific running application’s audio session.

Box Name Type Description
Process Name Dropdown/String The name of the application whose audio level you want to set. Select from the dropdown or type a name manually.
Volume Number The volume level to set (0–100).

The Process Name dropdown lists all applications that currently have an active audio session. Only these applications are supported — if your target app is not in the list, it may be using an audio API that is not compatible.

Typical workflow:

  1. Open the command and check the Process Name dropdown for your target application.
  2. Enter the desired volume (0 = mute, 100 = full volume).