monId = 0
If WScript.Arguments.Count = 0 Then
	monId = CLng(InputBox("Please enter the number of the monitor to which the mouse should get moved:", WScript.ScriptName))
Else
	monId = CLng(WScript.Arguments(0))
End If

Set sys = CreateObject("UltraMon.System")
If monId <= 0 Or monId > sys.Monitors.Count Then
	MsgBox "Please specify a valid monitor number.",, WScript.ScriptName
	WScript.Quit
End If

Set mon = sys.Monitors(monId - 1)
If mon.Enabled = False Then
	MsgBox "The mouse can't be moved to monitor " & monId & " because the monitor is disabled.",, WScript.ScriptName
Else
	sys.SetCursorPos mon.Left + (mon.Width / 2), mon.Top + (mon.Height / 2)
End If

