overwolf.utils

Use the overwolf.utils API to get the user’s system information, send keystrokes to the game, open URL in default browser and more.

Common use cases:

  • Getting a string that is currently placed on the clipboard
  • Getting the user’s system information (OS, monitors, CPU, GPU, input devices and more)
  • Opening a URL in a browser
  • Send keystrokes to the running game

Methods

placeOnClipboard(data)

Version added: 0.80

Copies the given string to the clipboard.

Permissions required: Clipboard

  • Parameter: data <string>

    The string to be copied to the clipboard.

getFromClipboard(callback)

Version added: 0.83

Gets the string currently placed on the clipboard. If no string is placed on the clipboard, returns null.

Permissions required: Clipboard

  • Parameter: callback <function>

    Called with the string from the clipboard.

getMonitorsList(callback)

Version added: 0.83

Returns an array with all monitors data including their display resolution, bounds, and names.

Permissions required: DesktopStreaming

  • Parameter: callback <function>

    Called with the monitors array.
Callback argument:
{
    "displays": [
        {
            "name": "Display 2",
            "id": "\\.\DISPLAY2",
            "x": -1280,
            "y": 0,
            "width": 1280,
            "height": 1024,
            "is_primary": false,
            "handle": {
                "value": 65579
            }
        },
        {
            "name": "Display 1",
            "id": "\\.\DISPLAY1",
            "x": 0,
            "y": 0,
            "width": 1920,
            "height": 1080,
            "is_primary": true,
            "handle": {
                "value": 65547
            }
        }
    ]
}

sendKeyStroke(keyString)

Version added: 0.83

Sends a string representing a key stroke to the game, causing a simulated key stroke.

Permissions required: GameControl

  • Parameter: keyString <string>

    The key or key combination to send, as a string. e.g. “Alt+I”

openFilePicker(filter, callback)

Version added: 0.91.100

Opens a file picker dialog to browse for a file. A url to the selected file will be returned.

Permissions required: FileSystem

  • Parameter: filter <string>

    A file filter. Supports wild cards (*) and seperated by commas (,). Ex. myFile*.*,*.txt

  • Parameter: callback <function>

    Called with a url to the selected file.

Callback argument:
{
    "status": "success",
    "url": "overwolf-fs://E/Video"
}

openWindowsExplorer(url, callback)

Version added: 0.91.200

Opens Windows Explorer and selects a file received as an Overwolf media url.

  • Parameter: url <string>

    An overwolf media url (overwolf://media/*)

  • Parameter: callback <function>

    Called with the result of the request.

isTouchDevice(callback)

Version added: 0.91.100

Returns whether the current device has touch capabilities.

  • Parameter: callback <function>

    Called with the result of the request.

Callback argument:
{
    "result": "success",
    "isTouch": false
}

openUrlInDefaultBrowser(url)

Version added: 0.91.200

Opens the url in the user’s default browser.

  • Parameter: url <string>

    A url to open.

openUrlInOverwolfBrowser(url)

Version added: 0.91.200

Opens the url in Overwolf’s browser.

  • Parameter: url <string>

    A url to open.

getSystemInformation(callback)

Version added: 0.92.200

Returns system information which includes information about CPU, Monitors, GPU, HDD, RAM and more.

  • Parameter: callback <function>

    Called with the system information.

Callback argument:
{  
   "status":"success",
   "systemInfo":{  
      "OS":"10.0 64Bit",
      "NetFramework":"4.6.1 or later (394802), v2.0.50727 SP2, v3.0 SP2, v3.5 SP1, v4 Client, v4 Full",
      "Monitors":[  
         {  
            "IsMain":true,
            "Name":"DELL U2412M",
            "Resolution":"1920, 1200",
            "Location":"0, 0",
            "Dpix":96,
            "Dpiy":96
         },
         {  
            "IsMain":false,
            "Name":"DELL U2412M",
            "Resolution":"1920, 1200",
            "Location":"1920, 0",
            "Dpix":96,
            "Dpiy":96
         }
      ],
      "CPU":"Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz",
      "LogicalCPUCount":4,
      "PhysicalCPUCount":4,
      "GPUs":[  
         {  
            "Name":"AMD Radeon HD 7900 Series",
            "Manufacturer":"Advanced Micro Devices, Inc.",
            "ChipType":"AMD Radeon Graphics Processor (0x679A)"
         }
      ],
      "MemorySize":"8531234816",
      "NumberOfScreens":2,
      "HardDisks":[  
         {  
            "Caption":"Samsung SSD 840 EVO 120GB",
            "Size":120031511040,
            "IsSsd":true
         },
         {  
            "Caption":"ST1000DM003-1ER162",
            "Size":1000202273280,
            "IsSsd":false
         }
      ],
      "Manufacturer":"MSI",
      "Model":"MS-7817",
      "IsLaptop":false,
      "Motherboard":"MSI H81M-P33 (MS-7817)",
      "AudioDevices":[  
         "AMD High Definition Audio Device",
         "Realtek High Definition Audio",
         "Logitech G933 Gaming Headset"
      ],
      "InputDevices":[  
         {  
            "vendor":1133,
            "id":49970,
            "type":"MOUSE"
         },
         {  
            "vendor":1133,
            "id":49714,
            "type":"KEYBOARD"
         },
         {  
            "vendor":1133,
            "id":49963,
            "type":"KEYBOARD"
         },
         {  
            "vendor":1133,
            "id":49713,
            "type":"MOUSE"
         }
      ]
   }
}

getPeripherals(callback)

Version added: 0.98.0

Returns system peripherals information.

  • Parameter: callback <function>

    Called with the system information.

Callback argument:
{  
   "status":"success",
   "peripherals":{  
      "inputDevices":[  
         {  
            "vendor":1133,
            "id":49970,
            "type":"MOUSE"
         },
         {  
            "vendor":1133,
            "id":49714,
            "type":"KEYBOARD"
         },
         {  
            "vendor":1133,
            "id":49963,
            "type":"KEYBOARD"
         },
         {  
            "vendor":1133,
            "id":49713,
            "type":"MOUSE"
         }
      ],
      "audioDevices":[  
         "AMD High Definition Audio Device",
         "Realtek High Definition Audio",
         "Logitech G933 Gaming Headset"
      ]
   }
}

openStoreOneAppPage(appId)

Version added: 0.98.0

Opens the requested app’s page in the Overwolf Appstore.

  • Parameter: appId <string>

    The requested app id