Login / Register
▼
Binary Fortress
Binary Fortress Software
CheckCentral
ClipboardFusion
CloudShow
DisplayFusion
FileSeek
HashTools
LogFusion
Notepad Replacer
Online Base64 Decoder
Online Base64 Encoder
Online JSON Formatter
ShellSend
TrayStatus
VoiceBot
WallpaperFusion
Window Inspector
More Apps...
DisplayFusion
CheckCentral
CloudShow
ClipboardFusion
FileSeek
VoiceBot
WallpaperFusion
Home
▼
Download
Download
Change Log
Download Beta
Beta Change Log
License (EULA)
▼
Features
Features
Incredible Desktop Wallpaper
Monitor Configuration
Monitor Splitting
Powerful Functions
Triggers
Multi-Monitor Taskbars
Useful Windows 10 Tweaks
Useful Windows 8 Tweaks
Windows Lock Screen
Multi-Monitor Screen Savers
Monitor Fading
Window Snapping
Window Management
Mouse Management
Alt+Tab Handler
Window Position Profiles
Desktop Icon Profiles
Remote Control
Available in dozens of Languages
Easy Administration
Free vs Pro
Purchase
Screenshots
Languages
▼
Help
Help Guide
FAQ
Discussions
Contact Us
Find My License
Mailing Address
Advanced Settings
Scripted Functions (Macros)
Display
Fusion
WARNING: You currently have Javascript disabled!
This website will not function correctly without Javascript enabled.
Title
Message
OK
Confirm
Yes
No
Move Mouse to Next Monitor and Position at 800,600 (在任何界面都可以从一个屏幕跳到另一个屏幕)
Return to DisplayFusion Scripted Functions (Macros)
Description
This script moves the mouse to the next monitor and positions it at 800 x 600.
Language
C# (.Net)
Minimum Version
9.5+
Created By
TianXia91400
Contributors
-
Date Created
Oct 24, 2019
Date Last Modified
Oct 24, 2019
Scripted Function (Macro) Code
Copy
Select All
Toggle Line Wrapping
using System; using System.Drawing; public static class DisplayFusionFunction { public static void Run(IntPtr windowHandle) { BFS.Window.Focus(BFS.Window.GetWindowByClass("WorkerW")); //Get the mouse X,Y values (获取鼠标的XY值) int x = BFS.Input.GetMousePositionX(); int y = BFS.Input.GetMousePositionY(); //Get the current monitor ID that the mouse is on (通过鼠标位置获取当前的监视器ID) uint currentMonitor = BFS.Monitor.GetMonitorIDByXY(x, y); //Get all monitor IDs (获取所有监视器ID) uint[] ids = BFS.Monitor.GetMonitorIDs(); //Find the current monitor in the array (查找我们在监视器ID数组中的位置) int index = -1; for(int i = 0; i < ids.Length; i++) { if(ids[i] != currentMonitor) continue; index = i; break; } //If index isn't found, exit script (如果找不到索引,请退出脚本) if(index == -1) return; //Find the next monitor ID (查找下一个监视器ID) uint nextMonitorID = ids[++index % ids.Length]; var mBounds = BFS.Monitor.GetMonitorBoundsByID(nextMonitorID); BFS.Input.SetMousePosition(mBounds.X, mBounds.Y); BFS.Input.SetMousePosition(mBounds.X + 800, mBounds.Y + 600); } }
Copyright © 2007-2021 Binary Fortress Software
•
News
•
Discussions
•
FAQ
•
Support
•
Privacy
•
ToS
•
Get DisplayFusion Merch