StrokesPlus.net Forum
»
General Discussion
»
Scripts
»
Cross the mouse to four bounds of the screen
Rank: Advanced Member
Groups: Moderators, Approved Joined: 4/23/2020(UTC) Posts: 161 Thanks: 46 times Was thanked: 23 time(s) in 17 post(s)
|
This small tool will cross the mouse to the up, down, left, right bound of the screen, and it suit for large screens if you aren't convenient to move the mouse from one point to another. You may need to do some changes to the script if you use more than one screen. I don't test and I guess it may forbid the mouse move to the next screen. Put the following code in Global Actions-Load/UnloadIt can work with this script A script close to WinXcorners program without conflict because I exclude four corners. So you can add the content in the CreateTimer behind the script code if of the above post. Code:sp.CreateTimer("CornerCheck",
0,
200,
`var mousePos = sp.GetCurrentMousePoint();
var mouseScreen = Screen.FromPoint(mousePos);
if(mousePos.X == mouseScreen.Bounds.Right - 1 && mousePos.Y > mouseScreen.Bounds.Top && mousePos.Y < mouseScreen.Bounds.Bottom - 1) {
//Right
sp.MouseMove(new Point(0, mousePos.Y));
} else if(mousePos.X == mouseScreen.Bounds.Left && mousePos.Y > mouseScreen.Bounds.Top && mousePos.Y < mouseScreen.Bounds.Bottom - 1) {
//Left
sp.MouseMove(new Point(mouseScreen.Bounds.Right, mousePos.Y));
} else if(mousePos.Y == mouseScreen.Bounds.Top && mousePos.X > mouseScreen.Bounds.Left && mousePos.X < mouseScreen.Bounds.Right - 1) {
//Top
sp.MouseMove(new Point(mousePos.X, mouseScreen.Bounds.Bottom));
} else if(mousePos.Y == mouseScreen.Bounds.Bottom - 1 && mousePos.X > mouseScreen.Bounds.Left && mousePos.X < mouseScreen.Bounds.Right - 1) {
//Bottom
sp.MouseMove(new Point(mousePos.X, 0));
}`
);
|
1 user thanked soooulp for this useful post.
|
|
|
StrokesPlus.net Forum
»
General Discussion
»
Scripts
»
Cross the mouse to four bounds of the screen
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close