Processing Ajax...
Save 25% on our desktop apps during our Black Friday/Cyber Monday sale!Save 25% on our desktop apps during our Black Friday/Cyber Monday sale, including DisplayFusion, ClipboardFusion, FileSeek, LogFusion, TrayStatus, and VoiceBot!Save 25% on our desktop apps during our Black Friday/Cyber Monday sale!

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Move Mouse Cursor to Center of Primary Monitor

Description
This script will move the mouse cursor to the center of the primary monitor.
Language
C#.net
Minimum Version
Created By
Keith Lammers (BFS)
Contributors
-
Date Created
Oct 19, 2015
Date Last Modified
Oct 19, 2015

Scripted Function (Macro) Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
	public static void Run()
	{
		Rectangle primaryMonitorBounds = BFS.Monitor.GetPrimaryMonitorWorkArea();
		BFS.Input.SetMousePosition(primaryMonitorBounds.Width / 2, primaryMonitorBounds.Height / 2);
	}
}