You can use scripts to automate tasks, or to provide functionality not directly available through UltraMon.

Scripts which manipulate the active (or foreground) window, for example move or maximize it, need to be run via hotkeys. To do this, place the script into a folder of your choice, then go to UltraMon Options > Hotkeys, select 'Run application or script' from the list of actions, click on Add Hotkey, then click on Browse to select the script you want to run.

Other scripts can be run directly, or via UltraMon's Shortcuts menu. To run a script from UltraMon's Shortcuts menu, copy the script to your shortcuts folder, you can open the folder via UltraMon menu > Shortcuts > Manage Shortcuts.

To have a script run automatically at startup, place the script or a shortcut to it into the Start Menu > Programs > Startup folder.

If a script requires configuration, for example you need to enter the name of the application which should get launched etc, open the script in a text editor (right-click the script file and select Edit from the menu), then configure the settings at the top of the script as desired, a description of each setting is shown next to the setting.

To run a script as administrator, create a new shortcut and set the 'location of item' field to the following:

%WINDIR%\System32\wscript.exe "<script>"

For example: %WINDIR%\System32\wscript.exe "C:\Temp\My script.vbs". Then right-click the newly created shortcut, select Properties from the menu, select the Shortcut tab and click on Advanced, then check the 'Run as administrator' option.

See the UltraMon Help for information on creating your own scripts.

Scripts for use with UltraMon

ActivateApp
Activates an application given the window caption. The first line of the script needs to be set to the window caption of the application you want to activate.

ActivateApps
Changes activation between multiple applications (identified by window caption) at a specified interval. You'll need to edit the first two lines of the script.

ActivateNextForegroundApp
Activates the foreground application on the other monitor, and optionally moves the mouse to that monitor as well. Requires UltraMon 3.1.0 or later.

AlwaysOnTop
Toggles the always on top status of the active window. Requires UltraMon 3.1.0 or later.

ApplyProfile
Applies a display profile periodically or after a specified delay.

ApplyProfileAndMoveWinTbar
Applies a display profile and then moves the Windows taskbar to a specific monitor. The first 2 lines of the script specify the profile and monitor to be used. More information

ApplyProfileAndRestoreIcons
Applies a display profile and then restores the position of the desktop icons, optionally saved icon positions can be loaded from a .reg file. You'll need to edit the first two lines of the script. To save icon positions to a .reg file, save current positions via UltraMon menu > Desktop Icons > Save Positions, then run regedit.exe, right-click the key HKEY_CURRENT_USER\Software\Realtime Soft\UltraMon Components\Saved Positions\Icons and select Export from the menu.

ApplyProfileAndWallpaperDockedUndocked
Applies a display profile and loads a wallpaper depending on whether the laptop is docked or not. You'll need to specify the display profiles and wallpapers that should be used on the first 4 lines of the script (full path and file name).

ApplyProfileAndWallpaperNumMons
Applies a display profile and/or loads a wallpaper depending on the number of enabled monitors. Two configurations are supported, you'll need to adjust the first 6 lines of the script.

ApplyShortcutDelayed
Launches an UltraMon shortcut after waiting a specified number of seconds. The first 2 lines of the script need to be adjusted (shortcut, delay).

CenteredMonitorPreviewLowPriority
Creates one or more fullscreen, centered, monitor preview windows running at a specified process priority (low by default). The first 6 lines of the script need to be adjusted for your needs.

CenterWnd
Centers the active window on the monitor it is on.

ChangeDesktop
Enables use of the Smart Taskbar on secondary virtual desktops if the virtual desktop hides the UltraMon taskbars. The script first switches to the next virtual desktop by sending a hotkey (the virtual desktop manager needs to support switching desktops via hotkeys), then shows the hidden UltraMon taskbars. Run the script for more information on configuring it. More information

ChangeScreenOrientation
Changes the screen orientation of the monitor with the mouse. By default the script switches between regular landscape and portrait, you can change this by editing the ORIENTATIONS option on the first line of the script. Requires UltraMon 3.1.0 or later.

ChangeWallpaper
Loads the next UltraMon wallpaper if you have created multiple UltraMon wallpapers. Line 3 needs to be adjusted for your system. More information

ChangeWallpaper2
Loads the next UltraMon wallpaper if you have created multiple UltraMon wallpapers, also works with UltraMon 3.

ChangeWallpaperAuto
Loads the next UltraMon wallpaper at a fixed interval if you have created multiple UltraMon wallpapers. Line 3 and 4 may need to be adjusted for your system. By default the wallpaper will get changed every hour. The only way to stop the script is to terminate the script host process, wscript.exe, via Task Manager.

ChangeWallpaperAuto2
Same as ChangeWallpaperAuto, but with support for UltraMon 3.

ClearActiveMon
Clears the monitor with the active application by moving all other windows on that monitor to the next monitor. Requires UltraMon 3.1.0 or later.

CloseApp
Closes all instances of a specific application. You'll need to edit the first line of the script. Requires UltraMon 3.1.0 or later.

DefaultSettingsForNewUsers
Creates default UltraMon settings for new users on a multi-user system. First set up all settings as desired, then run the script as administrator. When the new user logs in for the first time, the default settings will get copied to the new user's profile. See this thread in the forum for more information on what the script does.

DisableEnableMonitor
Disables/enables a specific monitor. You can set the monitor number in the script on line 1, pass it to the script as an argument or enter it interactively by running the script as-is.

DisableEnableScreenSaver
Disables or enables the screen saver.

DisableEnableSecondaryInd
Disables or enables secondary monitors one by one, instead of all at once. This is a workaround for systems where disabling/enabling multiple monitors at once doesn't work. More information

DisableEnableSecondaryNoIconSave
Disables or enables secondary monitors, but doesn't save the position of desktop icons before disabling secondary monitors.

DisableEnableSecondaryNoWndSave
Disables or enables secondary monitors, but doesn't save/restore the position of open windows.

EnableSecondaryAndChangePrimary
Enables the secondary monitors, waits for a specified number of seconds, then sets a new monitor as primary. You'll need to edit the first two lines of the script. More information

ExecuteHotkey
Executes a hotkey, optionally after a specified delay. You'll need to edit the first two lines of the script. More information

ExplorerOnMonitorX
Opens a new Windows Explorer window on a specified monitor. You'll need to adjust the first 3 lines for your needs. More information

FirefoxDesktopMaximized
Opens a website maximized across the desktop or two or more specific monitors in fullscreen mode in Firefox. You'll need to set the first line of the script to the website you want to display.

FitBottomHalf
Fits the foreground window to the bottom half of the monitor it is on.

FitLeftHalf
Fits the foreground window to the left half of the monitor it is on.

FitRightHalf
Fits the foreground window to the right half of the monitor it is on.

FitTopHalf
Fits the foreground window to the top half of the monitor it is on. More information

FitWndToScreenEdge
Fits the foreground window to a specified screen edge and resizes it to occupy a specified percentage of the screen. Multiple percentages can be specified so that you can switch the window between different sizes.

IconLayoutLoad
Loads an icon layout previously saved with the IconLayoutSave script.

IconLayoutSave
Saves the current desktop icon layout to a file, you can then later load it with the IconLayoutLoad script. Adjust the first two lines of the script to set the file name and location.

IeDesktopMaximized
Opens a website maximized across the desktop or two or more specific monitors in fullscreen mode in Internet Explorer. You'll need to set the first line of the script to the website you want to display. More information

KeepDesktopMaximized
Keeps an application desktop-maximized by periodically checking the window size and adjusting it if necessary.

LaunchAndMirrorApp
Launches an application, waits a bit then launches mirroring in application mirroring mode. Mirroring needs to be configured before you can use the script.

LaunchApp
Launches an application then moves it to the specified monitor or maximizes it to the desktop, optionally after waiting a number of seconds. Run the script for usage instructions.

LaunchApp2
Launches an application and moves it to the specified monitor or position, also resizes the window if desired. Optionally the application launch can be delayed, and the script can wait for the application to exit.

LaunchShortcutsDelayed
Launches one or more UltraMon shortcuts after a specified delay. You'll need to edit the first 3 lines of the script.

LaunchVideo
Takes a single argument, the video file, then starts the specified video player and moves the window to the specified position. You'll need to adjust the first 3 lines of the script. More information

Maximize2Mon
Maximizes the foreground window across two or more specified monitors instead of the whole desktop.

MaximizeApps
Maximizes all or one or more specific applications. The script runs constantly in the background, and checks for new windows every couple of seconds. You'll need to enter the names of the applications you want to maximize on the first line of the script. Requires UltraMon 3.1.0 or later.

MaximizeCurrentMons
Maximizes the active window to the monitors it is currently on, for example if the active window is halfway between two monitors, it gets maximized to those two monitors.

MaximizeVertically
Maximizes the foreground window only vertically, instead of both vertically and horizontally. Please note that you won't be able to restore the window to its original size using the restore button after it has been maximized vertically. More information

MinimizedWndRestoreActiveMon
When restoring a minimized window, it gets moved to the monitor with the mouse. Requires UltraMon 3.1.0 or later.

MinimizeWnd
Minimizes the foreground window.

MirrorActiveWnd
Mirrors the active window on another monitor using the MirrorMon add-on for UltraMon. Run the script again to close MirrorMon. Requires UltraMon 3.1.0 or later.

MirrorApp
Mirrors a specific application using UltraMon mirroring. Before using the script, run application mirroring at least once manually to configure initial settings. Requires UltraMon 3.0.3 or later.

MirrorAppMM
Mirrors a specific application using the MirrorMon add-on for UltraMon. Requires UltraMon 3.1.0 or later.

Mirroring
Mirrors one or more monitors on one or more other monitors. Use multiple instances of this script to switch between different mirroring configurations. You'll need to edit the first line of the script. Requires UltraMon 3.0.3 or later.

MirroringAutoStop
Stops mirroring if it has been running longer than a specified number of minutes. You can start the script at system startup, the script then checks mirroring status periodically and enforces the time limit.

MirroringRestartAuto
Runs in the background and starts mirroring if a specified number of enabled monitors become available.

MirrorMon
Mirrors a monitor on another monitor using the MirrorMon add-on for UltraMon. Edit the first six lines of the script to configure it for your needs.

MirrorWnd
Mirrors a window on another monitor using the MirrorMon add-on for UltraMon. The window is identified by its title. Optionally the script can start/stop MirrorMon in response to the window getting opened/closed, or becoming active/inactive (this feature requires UltraMon 3.1.0 or later).

MonInfo
Displays information about installed monitors.

MonSerNums
Displays the serial number and target ID (unique identifier assigned by the operating system) of each monitor. Requires Windows 7 or later and UltraMon 3.1.0 or later.

MoveActiveWnd
Moves the active window to the specified monitor (either set in the script or passed as a command-line argument). More information

MoveActiveWndNextMon
Moves the active window to the next monitor. Optionally the window can be moved to the previous monitor instead, and windows can also be moved only between certain monitors. See the comments in the script for details on configuring the options. More information

MoveAndMaximizeWnd
Moves the active window to the monitor set in the script and maximizes it. Optionally maximized windows can be restored before getting moved (set the RESTORE_IF_MAXIMIZED option).

MoveAppsToMonX
Moves applications from a specific monitor or all open applications to a different monitor. The source and destination monitors can be set directly in the script, or passed via command line arguments /s and /d. If you set the GUI option in the script to True a dialog gets shown for entering the destination monitor. UltraMon 3.1.0 or later is required for this script.
Source monitor can be one of the following: the number of the monitor, 'p' for the primary monitor, 'mouse' for the monitor with the mouse, or 'all' for moving all open applications.
Destination monitor can be one of the following: the number of the monitor, 'p' for the primary monitor, 'mouse' for the monitor with the mouse, 'next' for the next monitor, or 'prev' for the previous monitor.
Example: MoveAppsToMonX.vbs /s 3 /d p  moves all applications on monitor 3 to the primary monitor

MoveMouse
Moves the mouse to a specific monitor and centers it there. You can run the script directly, you will then get prompted to enter the monitor number, or you can pass the monitor number to the script as an argument. Requires UltraMon 3.1.0 or later.

MoveMouseToActiveApp
Moves the mouse to the active application and centers it there. The script runs constantly in the background, to terminate it open Task Manager, then terminate the wscript.exe process. You can adjust the interval between checks for activation changes by editing the first line of the script. Requires UltraMon 3.1.0 or later.

MoveOffscreenAppsToPrimary
Moves all offscreen applications to the primary monitor. Requires UltraMon 3.1.0 or later.

MoveSecondaryMonitorLeftOrRight
Toggles the position of the secondary monitor between left-of-the-primary and right-of-the-primary. Doesn't work on systems with more than 2 monitors. More information

MoveWinamp2
Moves Winamp version 2 (all windows) to a specific position. Set the position on lines 7 and 8 of the script.

MoveWinTbar
Moves the main taskbar to a specific monitor, optionally after waiting for a specified number of seconds. You'll need to configure the first two lines of the script. Please note that UltraMon may not always be able to move the main taskbar.

MultiBrowser
Opens multiple websites, one on each monitor. Lines 4-7 of the script need to be adjusted. More information

MultiBrowser2
Opens multiple websites, one on each monitor, in IE fullscreen. Lines 1-3 of the script need to be adjusted. More information

MultiBrowser3
Same as MultiBrowser2, but with support for Internet Explorer version 7.

MultiInstanceAdobeReader
Opens multiple instances of Adobe Reader on different monitors, optionally in fullscreen mode. For Adobe Reader X and later protected mode needs to be disabled (uncheck 'Enable Protected Mode at startup' under Preferences > Security (Enhanced) or under Preferences > General), but this is no longer necessary for Adobe Reader DC. Fullscreen mode only works if all monitors use the same resolution. Requires UltraMon 3.1.0 or later.

MultiInstanceChromeEdgeFirefox
Opens multiple instances of Chrome, Edge or Firefox on different monitors, optionally in fullscreen mode. Requires UltraMon 3.1.0 or later.

MultiInstanceIE
Opens multiple instances of Internet Explorer on different monitors, optionally in fullscreen mode. Requires UltraMon 3.1.0 or later when using the TERMINATE_EXISTING_INSTANCES option.

MultiInstanceIEexe
Opens multiple instances of Internet Explorer on different monitors, optionally in fullscreen mode. Unlike MultiInstanceIE, this script launches iexplore.exe directly instead of using the COM objects, which makes it possible to disable frame merging. If you don't need this, use MultiInstanceIE instead. Requires UltraMon 3.1.0 or later when using the TERMINATE_EXISTING_INSTANCES option.

MultiInstanceIrfanView
Opens multiple instances of IrfanView on different monitors, optionally in fullscreen mode. Requires UltraMon 3.1.0 or later when using the TERMINATE_EXISTING_INSTANCES option.

NewMail
Opens a new blank e-mail.

OpenDocOnMonX
Opens a document or Internet shortcut (.url file) on a specified monitor, see the script for required command-line arguments. Line 6 can be changed if Internet shortcuts should be opened in a browser other than Internet Explorer. More information

OpenDocOnMonX2
Same as OpenDocOnMonX, but instead of looking for the application's main window and then moving that to the specified monitor, the script waits a specified number of seconds and then moves the foreground window to the specified monitor. This is useful if OpenDocOnMonX doesn't work because the application launches a second instance of itself which contains the main application window.

OpenFolder
Opens the folder passed as an argument to the script.

OpenGwk
Disables secondary monitors, opens the .gwk file passed on the command line in GC-Prevue, then re-enables secondary monitors. You'll need to set the location of gcprevue.exe on the first line of the script. More information

PositionAllApps
Positions all applications on either a specific monitor or the monitor with the mouse. The script runs constantly in the background, to terminate it open Task Manager, then terminate the wscript.exe process. Configure the first 4 lines of the script as needed. Requires UltraMon 3.1.0 or later.

PositionApp
Positions instances of a specific application on either a specific monitor or the monitor with the mouse. The script runs constantly in the background, to terminate it open Task Manager, then terminate the wscript.exe process. Configure the options at the top of the script as needed. Requires UltraMon 3.1.0 or later. Use the PositionMultipleApps script if you want to position multiple applications.

PositionDialogs
Positions dialog windows such as a File Open dialog on the same monitor as the parent application. The script runs constantly in the background, to terminate it open Task Manager, then terminate the wscript.exe process. Requires UltraMon 3.1.0 or later.

PositionMultipleApps
Positions instances of multiple specific applications on either a specific monitor or the monitor with the mouse. The script runs constantly in the background, to terminate it open Task Manager, then terminate the wscript.exe process. Configure the first 5 lines of the script as needed. Requires UltraMon 3.1.0 or later.

PositionWnd
Sets the active window's position and size. If you set the REMEMBER_ORIG_POS option, running the script a second time restores the window to the original position and size. You need to adjust the first four lines of the script.

PositionWndClass
Positions windows based on the window class, when you run the script the first time for a window you get prompted to save the current position as the default, when running the script the next time the window will get moved to the saved position. Positions are saved in the registry under HKEY_CURRENT_USER\Software\Realtime Soft\PositionWndClass.vbs.

PositionWnds
Positions application windows based on the window caption or class. Requires UltraMon 3.1.0 or later.

ReloadWallpaper
Reloads the current UltraMon wallpaper by deleting the wallpaper bitmap generated by UltraMon, then regenerating it. To reload a specific UltraMon wallpaper, pass the full path and file name of the wallpaper to the script, for example:

ReloadWallpaper.vbs "C:\Temp\My UltraMon wallpaper.wallpaper"

If UltraMon wasn't installed in the default location, you'll need to adjust the first line of the script.

ReloadWallpaper2
Same as above, but for version 3 of UltraMon. Please note that passing a specific wallpaper isn't supported, the script always reloads the current wallpaper.

ResizeWnd
Resizes the active window to one or more specified sizes. If more than one size is specified, the window will get resized to the next size when you run the script again. You'll need to adjust the first line of the script.

RestartSmartTaskbar
Restarts the Smart Taskbar.

RestoreDesktopItems
Restores the position of desktop icons and Active Desktop items. Positions can be saved with SaveDesktopItems. Optionally the script can only restore desktop icon positions, and you can also configure the script to constantly run in the background and restore positions at a specified interval or if the number of enabled monitors has changed.

RotateApps
Rotates applications identified by window caption between monitors at a fixed interval. This only works if each application always has the same window caption, and the window caption is unique among running applications. You'll need to adjust the first two lines of the script.

RunMirrorConfig
Stops mirroring, then loads the mirroring configuration specified on the command line, and starts mirroring again. The first line of the script needs to be adjusted for your system. More information

SaveDesktopItems
Saves the position of desktop icons and Active Desktop items. Positions can be restored with RestoreDesktopItems. More information

SaveRestoreWndPos
Saves the position of open windows. To restore positions, run the script with the /r switch. Can be configured to run in the background and periodically save window positions when multiple monitors are enabled, and restore saved positions when changing from single-monitor mode back to multi-monitor mode.

ScreenSaveSelective
Runs a screen saver (via the Screen Saver Player add-on) on monitors which haven't been used for a specified period of time. You'll need to edit the script to set the location of the Screen Saver Player on your system. The script runs in the background, to terminate it you'll need to terminate wscript.exe using the Task Manager. Requires UltraMon 3.1.0 or later.

ShowDesktop
Shows or hides the desktop. Does the same thing as the Show Desktop command, or the WIN+D hotkey.

SingleMonStopTbar
Stops the Smart Taskbar if only a single monitor is enabled. More information

StickyNotesHideShow
Hides or shows Sticky Notes, including the taskbar button. Optionally the script can also hide/show only the taskbar button, set the TASK_BTN_ONLY option on the first line of the script to enable this. Please note that the script may need a couple of seconds if you have a lot of windows open. Requires UltraMon 3.1.0 or later.

SwapForegroundApps
Swaps the foreground (active) window and the topmost window on the other monitor. Requires UltraMon 3.1.0 or later.

SwapWnds
Swaps windows between monitors, on a two-monitor system all windows from monitor 1 get moved to monitor 2 and vice versa, on systems with more than 2 monitors all windows get moved to the next monitor, optionally windows can also be swapped between specific monitors. Requires UltraMon 3.1.0 or later.

SwitchApps
Switches between applications on the monitor with the active application. Requires UltraMon 3.1.0 or later.

SwitchPrimary
Sets the next monitor (in numerical order) as the primary monitor. Only works on Windows 2000/XP or later.

SwitchWallpaperSingleMultiMon
You specify two wallpaper profiles, one for a single-monitor configuration and one for a multi-monitor configuration. The script then monitors display configuration changes, and loads the appropriate wallpaper profile. This script runs constantly in the background, to terminate it you'll need to terminate wscript.exe via Task Manager. Enter the name of the wallpaper profiles on the first two lines of the script.

SysInfo
Displays system information such as the number of monitors and their settings.

ToggleMirroring
Toggles mirroring on or off. The first line of the script needs to be adjusted for your system if you didn't install UltraMon in the default location.

ToggleMirroring2
Same as ToggleMirroring, but with support for UltraMon 3.0.3 and later.

ToggleMirroringAndProfile
Specify the display profiles you want to use with mirroring running or not on the first two lines of the script, the script then toggles mirroring on or off and also applies the desired display profile.

ToggleScrPlayer
Starts one or more instances of the UltraMon Screen Saver Player on specific monitors, and closes them when you run the script again. You'll need to edit the first 3 lines of the script. Requires UltraMon 3.1.0 or later.

ToggleSecondaryAndPrimary
Toggles the secondary monitor between enabled/primary and disabled. The first two lines of the script may need to be adjusted for your system. More information

ToggleSingleMon
Enables the disabled secondary monitor, sets it as primary, then disables the old primary monitor. Only works correctly on systems with no more than two monitors. More information

ToggleSingleMon2
Same as above, but also works on systems with more than 2 monitors, and applies specific display settings in case the defaults don't work (for example on Windows 7). Identifies monitors by name, and on Windows 7 and later also by serial number or target ID (use the MonSerNums script to get those). See the script for details on configuration. Requires UltraMon 3.1.0 or later.

ToggleSmartTaskbarMode
Toggles the Smart Taskbar between standard and mirror mode. The Smart Taskbar gets stopped before changing the mode, and restarted afterwards. The first line of the script needs to be adjusted for your system. More information

ToggleVideoOverlays
Shows if video overlays are currently enabled or disabled, and allows you to disable or enable them. The script actually disables or enables DirectDraw acceleration, which also disables/enables video overlays.

UltraMon Wallpaper Auto Changer
Changes the desktop wallpaper at a set interval using images from a specified folder. See the script for detailed instructions. More information

UltraMon Wallpaper Auto Changer 2
Same as the UltraMon Wallpaper Auto Changer script, but with support for UltraMon 3. More information

VMonMaximizeWnd and VMonMoveWnd
Allows you to split monitors into two or more virtual monitors, then maximize and move windows to/between these virtual monitors. See the script for detailed instructions. More information

VMonMaximizeWnd2 and VMonMoveWnd2
Same as VMonMaximizeWnd/VMonMoveWnd, but the splits don't need to be even. For example you could split a monitor in two halves, with the left half being 75% wide, the right half 25%. See the script for detailed instructions. More information

VMonMaximizeWnd3 and VMonMoveWnd3
Same as VMonMaximizeWnd2/VMonMoveWnd2, but monitors can be partitioned arbitrarily. For example you could split a monitor in left and right halves, then split the right half in a top and bottom half. See the script for detailed instructions. More information

WndInfo
Displays information about the active window, for example position and size.

WndInfoAll
Writes information about all open windows such as title, window class, position etc to a text file. To include hidden windows, pass /h to the script as a command line argument, or set the INCLUDE_HIDDEN option on the first line of the script. Requires UltraMon 3.1.0 or later.

WndLayout
Arranges one or more windows on the desktop. Windows are identified by the caption text (wildcards are supported). Exact position and size can be specified for each window, or a window can get maximized on a specific monitor. You'll need to edit the first two lines of the script.

WndLayout2
Same as WndLayout, but by default positions all windows matching the specified caption instead of only the first one. Can optionally run in the background so that windows created after launching the script get moved as well. Requires UltraMon 3.1.0 or later.

WndLayoutAppInfo
Use this to get the window caption text and position required by the WndLayout script. Shows caption text and position of all open applications. Requires UltraMon 3.1.0 or later.