Skip to main content

overwolf.windows API

Use this API to create, interact with and modify your app’s windows.

info

Please make sure to read our guide on how to use Overwolf windows, to learn everything about Overwolf app windows, and how to use them properly and efficiently in your app.

Methods Reference

Events Reference

Types Reference

getMainWindow()

Version added: 0.113

Returns a window object of the index page.

This function allows you to get direct access to your main index page (which should be a controller/background page) and it’s HTML Window object (and thus any JS function or DOM element), which is also guaranteed to exist when calling this method from any other window (unlike the getOpenWindows()).

If you hold one global "manager" object in your background, then all other windows have a single object to interact with. This is why we recommend the getMainWindow() approach.

overwolf.windows.sendMessage performs object copying, so it might be a bit less efficient - depending on your use-case

Read more in the "Communication between windows" section.

getCurrentWindow(callback)

Version added: 0.78. updated: 0.153

Calls the given callback function with the current window object as a parameter.

ParameterTypeDescription
callback(Result: WindowResult) => voidA callback function which will be called with the current window object as a parameter

Note

  • The sizes returned in the callback already consider the DPI scaling.

obtainDeclaredWindow(windowName, callback)

Version added: 0.78

Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest
callback(Result: WindowResult) => voidA callback function which will be called with the current window object as a parameter

Notes

  • If the window does not exist - the function return null in the sizes.
  • If the window exists - the sizes returned in the callback already consider the DPI scaling.

obtainDeclaredWindow(windowName, overrideSetting, callback)

Version added: 0.78

Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest
overrideSettingWindowProperties ObjectOverride manifest settings
callback(Result: WindowResult) => voidA callback function which will be called with the current window object as a parameter

Notes

  • If the window does not exist - the function return null in the sizes.
  • If the window exists - the sizes returned in the callback already consider the DPI scaling.

obtainDeclaredWindow(windowName, useDefaultSizeAndLocation, callback)

Version added: 0.136

Creates an instance of your window (the window’s name has to be declared in the manifest.json) or returns a window by the window name.

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest
useDefaultSizeAndLocationDefaultSizeAndLocation ObjectEnable the manifest size and position settings
callback(Result: WindowResult) => voidA callback function which will be called with the current window object as a parameter

Usage example

overwolf.windows.obtainDeclaredWindow("main", {useDefaultSizeAndLocation: true}, console.log)

Notes

  • If the window does not exist - the function return null in the sizes.
  • If the window exists - the sizes returned in the callback already consider the DPI scaling.

getWindow(windowName, callback)

Version added: 0.191

Returns WindowResult object for a specific open window.

ParameterTypeDescription
windowNamestringThe name of the window that was declared in the data.windows section in the manifest
callback(Result: WindowResult) => voidCallback will be invoked with the WindowResult object.

Usage example

overwolf.windows.getWindow("main", console.log)

Notes

  • If the window does not exist - returns an error.

dragMove(windowId, callback)

Version added: 0.78

Start dragging a window.

ParameterTypeDescription
windowIdstringThe id or name of the window to drag
callback (Optional)(Result: DragMovedResult) => voidA callback which is called when the drag is completed

Notes

  • When you dragMove a native window between monitors with different DPIs, the window will automatically resize according to the new DPI.
  • When you quickly Click / DoubleClick a window that has dragMove(), without moving it at all - a "Left mouse released" error is thrown.

dragResize(windowId, edge)

Version added: 0.100

Start resizing the window from a specific edge or corner.

ParameterTypeDescription
windowIdstringThe id or name of the window to resize
edgeWindowDragEdge EnumThe edge or corner from which to resize the window

dragResize(windowId, edge, contentRect)

Version added: 0.100

Start resizing the window from a specific edge or corner.

ParameterTypeDescription
windowIdstringThe id or name of the window to resize
edgeWindowDragEdge EnumThe edge or corner from which to resize the window
contentRectODKRect ObjectThe real content of the window (for the ingame drawing resizing white area)

dragResize(windowId, edge, rect, callback)

Version added: 0.100

Start resizing the window from a specific edge or corner.

ParameterTypeDescription
windowIdstringThe id or name of the window to resize
edgeWindowDragEdge EnumThe edge or corner from which to resize the window
rectODKRect ObjectThe real content of the window (for the ingame drawing resizing white area)
callback(Result: DragResizeResult) => voidA callback which is called when the resizing process is completed

changeSize(windowId, width, height, callback)

Version added: 0.78

Changes the window size to the new width and height, in pixels.

OBSOLETE

This function is obsolete and doesn't calculate DPI - so you need to pre-calculate DPI before calling it, or, use this signature of that calculates DPI - so you don't need to calculate it yourself.

ParameterTypeDescription
windowIdstringThe id or name of the window to resize
widthintThe new width to resize the window to
heightintThe new height to resize the window to
callback (Optional)(Result) => voidReports success or failure when the size change is completed.

changeSize(changeSizeParams, callback)

Version added: 0.149

Changes the window size to the new width and height, in pixels, including DPI scale when resizing.

Notes

  • This function calculates DPI, so you don't need to calculate it yourself.
  • This function works for all the window types.
ParameterTypeDescription
ChangeWindowSizeParamsChangeWindowSizeParams ObjectContainer for the window settings
callback (Optional)(Result) => voidReports success or failure when the size change is completed.

Usage example

let sizeSettings = {
"window_id":"Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp",
"width":1000,
"height":1000,
"auto_dpi_resize":true //relevant only for native windows
};

overwolf.windows.changeSize(sizeSettings, console.log);

changePosition(windowId, left, top, callback)

Version added: 0.78

Changes the window position in pixels from the top left corner.

Note: changePosition() calculates DPI before changing position (so you should pass coordinates without calculating their DPI).

ParameterTypeDescription
windowIdstringThe id or name of the window for which to change the position
leftintThe new window position on the X axis in pixels from the left
topintThe new window position on the Y axis in pixels from the top
callback (Optional)(Result) => voidReports success or failure when the position change is completed.

close(windowId, callback)

Version added: 0.78

Closes the window.

ParameterTypeDescription
windowIdstringThe id or name of the window to close
callback (Optional)(Result: WindowIdResult) => voidCalled after the window is closed

minimize(windowId, callback)

Version added: 0.78

Minimizes the window.

ParameterTypeDescription
windowIdstringThe id or name of the window to minimize
callback (Optional)(Result: WindowIdResult) => voidCalled after the window is minimized

Notes

  • minimize() will minimize the targeted window even when the manifest resizable flag is set to false.
  • When minimizing a native window, the window object values for top,left,widthand height are unexpected and shouldn't be regarded.

maximize(windowId, callback)

Version added: 0.81

Maximize the window.

ParameterTypeDescription
windowIdstringThe id or name of the window to maximize
callback (Optional)(Result: WindowIdResult) => voidCalled after the window is maximized

Notes

  • maximize() will maximize the targeted window even when the manifest resizable flag is set to false.

  • In order to restore a maximized window to its previous state, call window.restore().

restore(windowId, callback)

Version added: 0.78

Restores a minimized/maximized/hidden window.

ParameterTypeDescription
windowIdstringThe id of the window to restore
callback (Optional)(Result: WindowIdResult) => voidCalled after the window is restored

Notes

  • When restoring a minimized/maximized window, it restores the window to the previous size/position.
  • When restoring a (non-desktop) window that is partly out of the game bounds, it repositions the window so that it fully fits inside the game bounds
  • Read some usage tips here.

restore(windowName, callback)

Version added: 0.78

Restores a minimized/maximize/hidden window.

ParameterTypeDescription
windowNamestringThe id of the window to restore
callback (Optional)(Result: WindowIdResult) => voidCalled after the window is restored

Notes

  • When restoring a minimized/maximized window, it restores the window to the previous size/position.
  • When restoring a (non-desktop) window that is partly out of the game bounds, it repositions the window so that it fully fits inside the game bounds
  • Read some usage tips here.

hide(windowId, callback)

Version added: 0.108

Hides the window from screen and taskbar.

Note that the tray icon (if defined) visibility is not affected by calling this function.

ParameterTypeDescription
windowIdstringThe id or name of the window to hide
callback(Result: WindowIdResult) => voidCalled after the window was hidden

getWindowState(windowId, callback)

Version added: 0.85

Returns the state of the window (normal/minimized/maximized/closed).

ParameterTypeDescription
windowIdstringThe id or name of the window to restore
callback(Result: GetWindowStateResult) => voidCalled with the window state

getWindowsStates(callback)

Version added: 0.90

Returns the state of all windows owned by the app (normal/minimized/maximized/closed).

ParameterTypeDescription
callback(Result: GetWindowsStatesResult) => voidCalled with an array containing the states of the windows

openOptionsPage(callback)

Version added: 0.89

Opens the options page specified in the manifest file. Does nothing if no such page has been specified.

ParameterTypeDescription
callback(Result) => voidReports success or failure

setDesktopOnly(windowId, shouldBeDesktopOnly, callback)

Version added: 0.89

Sets whether the window should be injected to games or not.

OBSOLETE

This function is obsolete.

If you are using this function on an in-game window while you are in a game, the window will hide, but it will not appear on the desktop automatically. Nevertheless, we are always recommending to use different windows for in-game and desktop.

ParameterTypeDescription
windowIdstringThe id or name of the window to set
shouldBeDesktopOnlybool
callback(Result: WindowIdResult) => voidCalled after the window was hidden

setRestoreAnimationsEnabled(windowId, shouldEnableAnimations, callback)

Version added: 0.89

Sets whether the window should have minimize/restore animations while in game.

ParameterTypeDescription
windowIdstringThe id or name of the window to set
shouldEnableAnimationsbool
callback(Result: WindowIdResult) => voidCalled after the window was hidden

setTopmost(windowId, shouldBeTopmost, callback)

Version added: 0.89

Change the window’s topmost status. Handle with care as topmost windows can negatively impact user experience.

ParameterTypeDescription
windowIdstringThe id or name of the window to set
shouldBeTopmostbool
callback(Result) => voidReports success or failure

sendToBack(windowId, callback)

Version added: 0.89

Sends the window to the back.

ParameterTypeDescription
windowIdstringThe id or name of the window to set
shouldBeTopmostbool
callback(Result) => voidReports success or failure

sendMessage(windowId, messageId, messageContent, callback)

Version added: 0.92

Sends a message to an open window.
The window receiving the message needs to listen on the onMessageReceived event.

danger

Using sendMessage performs object copying, so it might be a bit less efficient - depending on your use-case. It is not our suggested choice for communication between windows since it might not work on some occasions (for example, when sending extremely big messages).
Read more in the Windows Communication guide.

ParameterTypeDescription
windowIdstringThe id or name of the window to send the message to
messageIdstringA message id
messageContentObjectThe content of the message
callback(Result) => voidReports success or failure

Usage example

overwolf.windows.sendMessage('secondWindow', '1', 'hello second window', ()=>{console.log('Message sent to window "secondWindow"')})

setWindowStyle(windowId, style, callback)

Version added: 0.98

Add Window In Game styling (for example, allowing mouse clicks to be passed through the window into the game)

ParameterTypeDescription
windowIdstringThe id or name of the window to style
styleWindowStyle EnumThe style to be added
callback(Result) => voidReports success or failure

removeWindowStyle(windowId, style, callback)

Version added: 0.98

Remove window style.

ParameterTypeDescription
windowIdstringThe id or name of the window to style
styleWindowStyle EnumThe style to be removed
callback(Result) => voidReports success or failure

getOpenWindows(callback)

Version added: 0.92

Returns an array of all open windows as objects. The objects can be manipulated like any other window.

danger

we highly recommend not to use getOpenWindows() for windows communication.
Please read the "Communicating between windows" section for more info.

ParameterTypeDescription
callbackfunctionA callback function which will be called with a map object of (window-name, Window Object) items

setMute(mute, callback)

Version added: 0.102

Set the current window mute state (on/off).

ParameterTypeDescription
muteboolWindow mute state (true - mute is on, false - mute is off)
callback(Result) => voidReports success or failure

muteAll(callback)

Version added: 0.102

Mutes all sound sources for the current window.

ParameterTypeDescription
callback(Result) => voidCalled with the result of the request

isMuted(callback)

Version added: 0.102

Get the window’s mute state (true/false).

ParameterTypeDescription
callback(Result: IsMutedResult) => voidCalled with the result of the request {"muted": true/false}

isWindowVisibleToUser(callback)

Version added: 0.102

Get the Visibility state of the window.

danger

Used only with windows without a transparent border.

ParameterTypeDescription
callback(Result: IsWindowVisibleToUserResult) => voidCalled with the result of the request {"visible": hidden/fully/partial}

bringToFront(windowId, callback)

Version added: 0.119

Brings the requested window to the front.

ParameterTypeDescription
windowIdstringThe id or name of the window
callback(Result) => voidCalled with the result of the request

Notes

  • For in-game windows, calling this function will always bring the window to the front.
  • For desktop/native windows, the behavior depends on the game mode:
    • Fullscreen game: The window will stay in the background behind the game. If you want to take focus, use the grabFocus version.
    • Windowed game: The window will move to the foreground. The game window will not be changed.

bringToFront(callback)

Version added: 0.119

Brings this window to the front.

Notes

  • For in-game windows, calling this function will always bring the window to the front.
  • For desktop/native windows, the behavior depends on the game mode:
    • Fullscreen game: The window will stay in the background behind the game. If you want to take focus, use the grabFocus version.
    • Windowed game: The window will move to the foreground. The game window will not be changed.
ParameterTypeDescription
callback(Result) => voidCalled with the result of the request

bringToFront(grabFocus, callback)

Version added: 0.124

Brings this window to the front.

Notes

  • For in-game windows, calling this function will always bring the window to the front.
  • For desktop/native windows, the behavior depends on the game mode AND the grabFocus param:
    • Fullscreen game + grabFocus:false - The window will stay in the background behind the game.
    • Fullscreen game + grabFocus:true - The window will move to the foreground and take the focus. The game window will be minimized (use with caution, usually it's a bad UX).
    • Windowed game + grabFocus:true/false - The window will move to the foreground. The game window will not be changed.
ParameterTypeDescription
grabFocusboolwindow will take system focus
callback(Result) => voidCalled with the result of the request

bringToFront(windowId, grabFocus, callback)

Version added: 0.124

Brings a window to the front.

Notes

  • For in-game windows, calling this function will always bring the window to the front.
  • For desktop/native windows, the behavior depends on the game mode AND the grabFocus param:
    • Fullscreen game + grabFocus:false - The window will stay in the background behind the game.
    • Fullscreen game + grabFocus:true - The window will move to the foreground and take the focus. The game window will be minimized (use with caution, usually it's a bad UX).
    • Windowed game + grabFocus:true/false - The window will move to the foreground. The game window will not be changed.
ParameterTypeDescription
windowIdstringThe id or name of the window
grabFocusboolwindow will take system focus
callback(Result) => voidCalled with the result of the request

setPosition(properties, callback)

Version added: 0.123

Change this window location in the opened windows stack.

ParameterTypeDescription
propertiesSetWindowPositionProperties ObjectThe desired location in the windows stack
callback(Result) => voidCalled with the result of the request

Usage Example

Using the following code will place your app window in front of League of Legends’ client window:

overwolf.windows.setPosition({
"relativeTo": {
"processName": "LeagueClientUx",
"windowTitle": "League of Legends"
},
"insertAbove": true,
},
console.log);

setPosition(windowId, properties, callback)

Version added: 0.123

Change a window location in the opened windows stack.

ParameterTypeDescription
windowIdstringThe id or name of the window
propertiesSetWindowPositionProperties ObjectThe desired location in the windows stack
callback(Result) => voidCalled with the result of the request

displayMessageBox(messageParams, callback)

Version added: 0.119

Displays a customized popup message prompt.

ParameterTypeDescription
messageParamsMessageBoxParams ObjectThe type and texts that the message prompt will have
callback(Result: DisplayMessageBoxResult) => voidReturns the user's action (confirmed = true / false)

Usage Example

Using the following code will create a pop up message for your app:

overwolf.windows.displayMessageBox({
message_title: "title_text",
message_body: "body_text",
confirm_button_text: "Confirm",
cancel_button_text: "Cancel",
message_box_icon: overwolf.windows.enums.MessagePromptIcon.ExclamationMark
},console.log)

isAccelreatedOSR(callback)

Version added: 0.126

Is the current window accelerated and is OSR |GPU| acceleration is supported for this machine.

Note that the function name is misspelled. It is kept this way for backwards compatibility.

OBSOLETE

The OSR acceleration feature is is no longer supported and maintained.

ParameterTypeDescription
callback(Result) => voidCalled with the result of the request

Callback argument: Success

A callback function which will be called with the status of the request

{
"success": true,
"status": "success", //for backward compatibility
"accelerated":false,
"supported":true,
"optimized": true
}

setMinSize(windowId, width, height, callback)

Version added: 0.132

Overrides the window's defined minimum size.

ParameterTypeDescription
windowIdstringThe id of the window
widthintThe new minimum width
heightintThe new minimum height
callback(Result) => voidCalled with the result of the request

flash(windowId, behavior,callback)

Version added: 0.146

Flashes a window.

ParameterTypeDescription
windowIdstringThe id of the window to flash
behaviorFlashBehavior enumDefines window flashing behavior
callback(Result) => voidCalled with the result of the request

setZoom(zoomFactor, windowId)

Version added: 0.154

Set window zoom level (0.0 for reset).

ParameterTypeDescription
zoomFactordoubleThe new zoom factor. A value of 0 sets the window to its current default zoom factor. Values greater than 0 specify a (possibly non-default) zoom factor for the window.
windowIdstringThe window id, empty for current window

onMainWindowRestored

Version added: 0.85

Fired when the main window is restored.

onStateChanged

Version added: 0.85

Fired when the state of a window is changed, with the following structure: WindowStateChangedEvent Object

The event is being fired for all the declared windows (background,in-game,desktop, etc). If your app has multiple windows listening to this event - you also need to test the window name/id arguments that are passed to the event to see if it is relevant for your window.

onMessageReceived

Version added: 0.85

Fired when this window received a message, with the following structure: MessageReceivedEvent Object

Usage example

overwolf.windows.onMessageReceived.addListener((message) =>
{
if(message.id === '1')
{
console.log('Message received', message.content)
}
}
)

onAltF4Blocked

Version added: 0.85

Fired on all app windows when the user was prevented from closing a window using Alt+F4, with the following structure: AltF4BlockedEvent Object

onScreenPropertyChanged

Version added: 0.143

Fired when native window (or OSR on desktop) moved to other monitor when current monitor resolution changed, with the following structure: onScreenPropertyChangedEvent Object

Notes

  • Currently, only the relevant window gets this event - so your background page or other windows doesn't.
  • From OW v0.156 we are going to fix it: The event is being fired for all the declared windows (background,in-game,desktop, etc). If your app has multiple windows listening to this event - you also need to test the window name/id arguments that are passed to the event to see if it is relevant for your window.

WindowProperties Object

Version added: 0.118

An object that allows to override the manifest.json requested window settings.

ParameterTypeDescription
nativeWindowbool
enablePopupBlockerbool
isBottomMostboolIndicates whether the window will be on bottom of other Overwolf windows

DefaultSizeAndLocation Object

Version added: 0.136

An object that Enable the manifest size and position settings (default is false).

ParameterTypeDescription
useDefaultSizeAndLocationbool

The default behaviour of OW is to "remember" the last size and position of a window, before it closes. When useDefaultSizeAndLocation is set to true, the window will be created using the default (manifest) size and location, rather than the saved setting (if one exists).

If there is no "start_position" property (size and position) for a window in the manifest, it will default to 0,0.

MessageBoxParams Object

Version added: 0.119

Defines parameters required for displaying a message box.

ParameterTypeDescription
message_titlestringThe message prompt title text
message_bodystringThe message prompt body text
confirm_button_textstringThe left (confirmation) button’s text
cancel_button_textstringThe right (cancellation) button’s text
message_box_iconMessagePromptIcon enumThe icon of the message prompt

RelativeTo Object

Version added: 0.123

Data to find OS relative window.

ParameterTypeDescription
processNamestringRelative window process name
windowTitlestringThe window title

SetWindowPositionProperties Object

Version added: 0.123

Data to find OS relative window.

ParameterTypeDescription
relativeToRelativeTo ObjectRelative window data to search for
windowTitlestringThe window title

ODKRect Object

Version added: 0.100

An object that holds information about the real content of the window (for the ingame drawing resizing white area).

ParameterTypeDescription
topint
leftint
widthint
heightint

WindowStyle enum

Version added: 0.78

An object which specifies the window style.

OptionDescription
InputPassThroughMouse and keyboard input will pass to the window AND to the game (no input blocking).
BottomMostWhen set true to a window, it's not possible to drag it over other app's windows.

Note: the manifest clickthrough flag has a different behavior - when it's set to true, the input passes through the window to the game.

MessagePromptIcon enum

Version added: 0.78

Message prompt icon.

OptionDescription
NoneNo Icon
QuestionMarkQuestion mark
ExclamationMarkExclamation mark

WindowDragEdge enum

Version added: 0.78

Message prompt icon.

OptionDescription
NoneNo window edge or corner to drag
LeftDrag the left window edge in order to resize it
RightDrag the right window edge in order to resize it
TopDrag the top window edge in order to resize it
BottomDrag the bottom window edge in order to resize it
TopLeftDrag the top-left window edge in order to resize it
TopRightDrag the top-right window edge in order to resize it
BottomLeftDrag the bottom-left window edge in order to resize it
BottomRightDrag the bottom-right window edge in order to resize it

FlashBehavior enum

Version added: 0.146

Window flashing behavior.

OptionDescription
automaticTurns off automatically when the window regains focus. Does not turn on if window is already in focus.
onTurns flashing on
offTurns flashing off

WindowType enum

Version added: 0.191

Window Type

OptionDescription
BackgroundBackground window
DesktopDesktop window
OffScreenOffscreen (in-game) window

onScreenPropertyChangedEvent Object

ParameterTypeDescription
idstringthe window ID
namestringthe window name
monitoroverwolf.utils.Display objectDisplay info

Event data example: Success

{
"id": "Window_Extension_anoahjhemlbnmhkljlgbmnfflpnhgjpmfjnhdfoe_desktop",
"name": "desktop",
"monitor": {"name": "DELL P2319H", "id": "DISPLAY4", "x": 0, "y": 0, "width": 1920, "height": 1080, "is_primary": true}
}

WindowStateChangedEvent Object

ParameterTypeDescriptionNotes
window_idstringthe window IDSee notes.
window_statestringthe window stateDeprecated. See notes.
window_state_exstringthe window stateSee notes.
window_previous_statestringthe window previous stateDeprecated. See notes.
window_previous_state_exstringthe window previous stateSee notes.
app_idstringthe app IDSee notes.

Event data example: Success

{
"window_id": "Window_Extension_cghphpbjeabdkomiphingnegihoigeggcfphdofo_index",
"window_state_ex": "normal", //use this
"window_state": "normal",
"window_previous_state_ex": "closed", //use this
"window_previous_state": "minimized",
"app_id": "cghphpbjeabdkomiphingnegihoigeggcfphdofo",
"window_name": "index"
}

State Change Notes

  • Use window_state_ex and window_previous_state_ex that are more accurate than the old window_state and window_previous_state, left for backward comparability.
  • window_state_ex returns one of these states: [closed | minimized | hidden | normal | maximized].

ChangeWindowSizeParams Object

Version added: 0.149

Container for the window settings.

ParameterTypeDescription
window_idstring
widthint
heightint
auto_dpi_resizebooleanrelevant only for native windows. Overwrite the disable_auto_dpi_sizing manifest flag
{
"window_id":"Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp",
"width":1000,
"height":1000,
"auto_dpi_resize":true
}

WindowResult Object

Version added: 0.149

Container for the currrent window object.

ParameterTypeDescription
windowWindowInfo object
{
"success": true,
"window": { ... }
}

WindowInfo Object

Version added: 0.149

The current window object.

ParameterTypeDescription
idstring
namestring
widthnumberwith DPI conversion
heightnumberwith DPI conversion
topnumberwith DPI conversion
leftnumberwith DPI conversion
monitorIdstring
isVisibleboolean
statestringdeprecated and kept only for backward compatibility
stateExWindowStateEx enumalways use this param to get the state of the window
monitorIdstringreturn monitorId (If the Window is not opened already) - allowing one window (background) to know on which monitor another window exists.
ParentstringThe parent window id
typestringWindowType object (version added: 0.191)
{
"success": true,
"window": {
"id": "Window_Extension_hffhbjnafafjnehejohpkfhjdenpifhihebpkhni",
"name": "index",
"width": 600,
"height": 600,
"top": 153,
"left": 417,
"monitorId": "\\.\DISPLAY4",
"isVisible": true,
"state": "Minimized", //deprecated
"stateEx": "hidden", //the state of the window
"Parent": null
}

WindowStateEx enum

Version added: 0.149

Possible windows states.

OptionDescription
closed
minimized
hidden
normal
maximized

DragMovedResult Object

Version added: 0.149

Container for the horizontal and vertical changes after an OW app window dragged or moved.

ParameterTypeDescription
horizontalChangenumber
verticalChangenumber

Example data: Success

{
"success": true,
"horizontalChange": -51,
"verticalChange": 6
}

DragResizeResult Object

Version added: 0.149

Container for the width and height changes after an OW app window resized.

ParameterTypeDescription
idstring
widthnumber
heightnumber

Example data: Success

{
"success": true,
"id": "Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp",
"width": 600,
"height": 800
}

WindowIdResult Object

Version added: 0.149

Container for the width and height changes after an OW app window resized.

ParameterTypeDescription
window_idstring

Example data: Success

{
"success": true,
"window_id": "Window_Extension_nhmkaollkcmjiecdnnjmgfifjgkfegkljnjjbipp"
}

GetWindowStateResult Object

Version added: 0.149

Container for the window states.

ParameterTypeDescription
window_idstring
window_statestring
window_state_exWindowStateEx enum

Example data: Success

{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"window_id": "Window_Extension_onemchifcjibofkgemelmnjeialamgnigfpomeih",
"window_state": "minimized", //deprecated and kept only for backward compatibility
"window_state_ex": "hidden" //always use this param to get the state of the window.
}

GetWindowsStatesResult Object

Version added: 0.149

Container for the windows states array.

ParameterTypeDescription
resultDictionary< string >
resultV2Dictionary<WindowStateEx>

Example data: Success

{
"success": true,
"result": "{background:`minimized`, desktop:`normal`, overlay:`normal`}",
"resultV2": "{background:`hidden`, desktop:`normal`, overlay:`normal`}"
}

IsMutedResult Object

Version added: 0.149

Container for the mute state.

ParameterTypeDescription
mutedboolean

Example data: Success

{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"muted": true
}

IsWindowVisibleToUserResult Object

Version added: 0.149

Container for the window visibility states.

ParameterTypeDescription
visiblestring
  • "hidden" – The window is completely hidden.
  • "fully" – The window is fully visible to the user.
  • "partial" – The window is partially visible to the user (and partially covered by other window/s).

Example data: Success

{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"hidden": true
}

displaymessageboxresult Object

Version added: 0.149

Container for the window visibility states.

ParameterTypeDescription
confirmedboolean

Example data: Success

{
"success": true,
"status": "success", //deprecated and kept only for backward compatibility
"confirmed": true
}

MessageReceivedEvent Object

ParameterTypeDescriptionNotes
idstringthe message ID
contentstringthe message content

Event data example: Success

{
"id": "1",
"content": "hello"
}

AltF4BlockedEvent Object

ParameterTypeDescriptionNotes
idstringthe window ID
namestringthe window name

Event data example: Success

{
"id": "1",
"name": "index"
}