Endless mouse

Share your favorite FastKeys commands
User avatar
Posts: 58
Joined: Tue Mar 18, 2014 8:46 am
Location: The Netherlands

Endless mouse

PostPosted by Ennovy » Fri Apr 11, 2014 7:46 pm

I have a script that reads mouse position every 1/2 second
When the mouse reaches the end of the screen, the cursor will be moved to the beginning of the screen and vice versa.
This simulates and endless mouse.
When I test the script it works fine.
I want to start it when FK starts and stop it when FK is closed.
This is what I tried (but doesn't work):

New Start Menu entry
Menu: Mouse
Submenu: Endless Mouse
Type: Command
Options: Run on startup

Command:
Code: Select all
#Persistent
CoordMode, Mouse, Screen

SetTimer, ClosePopup, 500

ClosePopup:
MouseGetPos, xpos, ypos
IfGreater, xpos, 1918 ; my screen with is 1920 pixels
   MouseMove, -1918, 0, 0, R
IfLess, xpos, 1
   MouseMove, 1918, 0, 0, R
;IfLess, ypos, 1
;   MouseMove, 0, 1078, 0, R
return


My script also has options to close, move resize certain windows when they are created or activated.
Or automatically click the OK button in some windows etc etc.
For now I want to focus on this endless mouse feature.

So the script needs to stay resident. Can this be done with FK

Thanks Marko

Site Admin
User avatar
Posts: 641
Joined: Sat Mar 02, 2013 9:02 pm

Re: Endless mouse

PostPosted by Marko » Sat Apr 12, 2014 7:42 pm

Ennovy, great idea. There was a tiny bug in the "Run on Startup" routine which was now corrected. You can download and re-install and it should work.

User avatar
Posts: 58
Joined: Tue Mar 18, 2014 8:46 am
Location: The Netherlands

Re: Endless mouse

PostPosted by Ennovy » Sat Apr 12, 2014 7:53 pm

Marko wrote:Ennovy, great idea. There was a tiny bug in the "Run on Startup" routine which was now corrected. You can download and re-install and it should work.


Great software AND support!
Now it works fine, thanks very much Marko

Guest

Re: Endless mouse

PostPosted by Guest » Sun Sep 14, 2014 10:29 pm

Cool idea, thanks for this useful command, just what I needed. :D

User avatar
Posts: 58
Joined: Tue Mar 18, 2014 8:46 am
Location: The Netherlands

Re: Endless mouse

PostPosted by Ennovy » Mon Sep 15, 2014 7:43 am

Guest wrote:Cool idea, thanks for this useful command, just what I needed. :D

Glad you like it :D

User avatar
Posts: 58
Joined: Tue Mar 18, 2014 8:46 am
Location: The Netherlands

Re: Endless mouse

PostPosted by Ennovy » Wed Jan 07, 2015 10:28 am

The script stopped working and the
Code: Select all
#Persistent

command is now displayed in red :roll:

Is this command no longer valid or is there some bug introduced in the latest version?

Site Admin
User avatar
Posts: 641
Joined: Sat Mar 02, 2013 9:02 pm

Re: Endless mouse

PostPosted by Marko » Wed Jan 07, 2015 12:06 pm

Nothing wrong with the script, also the syntax coloring is still the same.

What I see is that submenus with "Run on startup" option are not displayed correctly. This will be resolved in a next release. Until then you can put the script to first level menu.

User avatar
Posts: 58
Joined: Tue Mar 18, 2014 8:46 am
Location: The Netherlands

Re: Endless mouse

PostPosted by Ennovy » Wed Jan 07, 2015 1:42 pm

Marko wrote:Nothing wrong with the script, also the syntax coloring is still the same.

What I see is that submenus with "Run on startup" option are not displayed correctly. This will be resolved in a next release. Until then you can put the script to first level menu.


The script IS in the first level menu :)

Now I know how it started:
Yesterday I created a second start menu, to be activated with a hotkey.

I removed the second start menu and everything works fine again. So it must be a bug in FK

Site Admin
User avatar
Posts: 641
Joined: Sat Mar 02, 2013 9:02 pm

Re: Endless mouse

PostPosted by Marko » Thu Jan 08, 2015 7:28 am

Thanks Ennovy., will be resolved.

Return to User Commands and Scripts

Who is online

Users browsing this forum: No registered users and 1 guest