Window Capture Input
Window Capture input properties for Script Engine. Captures the contents of any top-level Windows window — or a whole display — and presents it as a live video source. Video only; the input carries no audio.
| Property | Type | Access | Description |
|---|---|---|---|
ShowAdvancedOptions |
bool |
get/set |
Show or hide the input's advanced settings in the editor UI. [default=false]. |
AutoStart |
bool |
get/set |
When On, the input starts capturing automatically when the project loads. [default=false]. |
CaptureTarget |
WindowCaptureTargetKind |
get/set |
Whether to capture a single window or a whole display. [default=Window]. Switching between the two while capturing re-attaches without stopping the input. |
AvailableTargets |
StringCollectionEnum |
get/set |
Picker listing the windows (or displays) available to capture right now. The list re-reads itself every couple of seconds, so an application opened after this input was added turns up on its own; RefreshTargetsCommand re-reads it immediately. Choosing an entry writes WindowTitle or DisplayIndex, which are the values actually saved with the project; scripts and the API normally set those directly instead of going through this list. |
RefreshTargetsCommand |
Command |
get |
Re-reads the list of windows and displays on this machine immediately, without waiting for the automatic refresh. |
WindowTitle |
string |
get/set |
Title of the window to capture. Used when CaptureTarget is Window. An exact title match wins; failing that the first window whose title contains this text is used, so a short, stable fragment ("Scoreboard", "Wikipedia") keeps working when a browser rewrites the rest of the title. A window is matched by title rather than by handle because a window handle is only valid for as long as that instance of the application runs — a title survives a restart. |
DisplayIndex |
int |
get/set |
Which display to capture, counting from 1. Used when CaptureTarget is Display. |
CaptureCursor |
bool |
get/set |
Whether the mouse cursor is drawn into the captured picture. [default=false]. Ignored on Windows 10 builds older than 2004, which always draw it. |
ShowCaptureBorder |
bool |
get/set |
Whether Windows draws its yellow "being captured" border around the source. [default=false]. The border is part of the captured picture, so it is normally left off. Ignored on Windows builds older than Windows 11 21H2, which always draw it. |
SpawnBrowser |
BrowserSpawnMode |
get/set |
Whether this input launches its own browser to capture, and what kind of window it asks for. [default=Off]. |
BrowserUrl |
string |
get/set |
Address the launched browser opens. Used when SpawnBrowser is not Off. Must be a complete http or https address. |
KeepBrowserActive |
bool |
get/set |
How often a synthetic event is delivered to the launched browser's page to stop it deciding nobody is there, in seconds. [default=60]. Set KeepBrowserActive to switch it on. |
KeepAliveIntervalSeconds |
int |
get/set |
Seconds between the events sent when KeepBrowserActive is on. [default=60]. |
KeepAliveActivity |
BrowserKeepAliveActivity |
get/set |
Which event is sent to keep the page awake. [default=MouseMove]. |
BrowserExecutablePath |
string |
get/set |
Full path to the browser to launch. Empty searches the usual install locations. |
BrowserProfileDirectory |
string |
get/set |
Directory holding the launched browser's profile — its sign-ins, cookies and settings. Empty uses a directory of this input's own, under the user's local application data, which is what keeps a sign-in across restarts and across renaming this input. |
AutomationPort |
int |
get/set |
Port the launched browser listens on for the connection that keeps its page awake. [default=0], which picks a free port automatically. |
BrowserSwitches |
string |
get/set |
Extra command-line switches for the launched browser, space separated, each starting with --. Appended after the ones this input always passes, so they can override them. |
ConnectionStatus |
ConnectionStatus |
get |
Current capture state (Disconnected, Connecting, Connected). Read-only. Connecting means the input is running but has not found its window yet — which is the normal state while the application it belongs to is still starting. |
StartCommand |
Command |
get |
Begins capturing the selected window or display. |
StopCommand |
Command |
get |
Stops capturing and releases the capture session. |
CapturedSource |
string |
get |
Full title of the window actually attached to, which is usually longer than the text searched for (read-only). |
Width |
int |
get |
Width of the captured picture in pixels (read-only). Changes when the window is resized. |
Height |
int |
get |
Height of the captured picture in pixels (read-only). Changes when the window is resized. |
CaptureFrameRate |
double |
get |
Frames captured per second, averaged over the last second (read-only). This is the rate the source is actually changing at, not the project's frame rate: a still page produces almost nothing, and a video playing in the window produces its own rate. |
CapturedFrames |
long |
get |
Total frames captured since the input started (read-only). |
DroppedFrames |
long |
get |
Frames the source produced faster than the project could show them (read-only). A steadily climbing figure just means the window changes faster than the project's frame rate; nothing is wrong, the newest picture is always the one rendered. |
LaunchedBrowser |
string |
get |
The browser this input launched, if it launched one (read-only). Empty when capturing a window somebody else opened. |
KeepAliveEventsSent |
int |
get |
How many events have been delivered to keep the page awake since the input started (read-only). A count that stays at zero while KeepBrowserActive is on means the connection to the browser never succeeded — the reason appears in the log. |
ComponentLog |
ComponentLog |
get |
Recent status, information and error messages from the input (read-only). |
Inherits from: AbstractInput, AbstractAudioProcessing, AbstractAudioMetering, NamedModel.
See also: Window Capture Input in Inputs — user-facing introduction, screenshots, and section summaries.