StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
soooulp  
#1 Posted : Monday, February 7, 2022 8:38:17 AM(UTC)
soooulp

Rank: Advanced Member

Reputation:

Groups: Moderators, Approved
Joined: 4/23/2020(UTC)
Posts: 161
China

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/Unload

It 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));
                        }`
);





thanks 1 user thanked soooulp for this useful post.
randomConstant on 2/9/2022(UTC)
Users browsing this topic
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.