{ "name": "Move Window to Opposite Monitor", "language": 0, "code": "using System;\r\nusing System.Drawing;\r\n\r\n// The 'windowHandle' parameter will contain the window handle for the:\r\n// - Active window when run by hotkey\r\n// - Trigger target when run by a Trigger rule\r\n// - TitleBar Button owner when run by a TitleBar Button\r\n// - Jump List owner when run from a Taskbar Jump List\r\n// - Currently focused window if none of these match\r\npublic static class DisplayFusionFunction\r\n{\r\n\tpublic static void Run(IntPtr windowHandle)\r\n\t{\r\n uint currentMonitor = BFS.Monitor.GetMonitorIDByXY(BFS.Input.GetMousePositionX(), BFS.Input.GetMousePositionY());\r\n\t\r\n\t\tif (currentMonitor == 1)\r\n\t\t{\r\n BFS.Window.MoveToMonitor(2, windowHandle);\r\n\t\t}\r\n\t\telse if (currentMonitor == 2)\r\n\t\t{\r\n BFS.Window.MoveToMonitor(1, windowHandle);\r\n\t\t}\r\n\t}\r\n}", "description": "This script is for dual monitor setups and will move the mouse to the monitor that the mouse cursor is not on.", "references": "System.Core.dll|System.Data.dll|System.dll|System.Drawing.dll|System.Management.dll|System.Web.dll|System.Windows.Forms.dll|System.Xml.dll" }