Endless mouse

Share your favorite FastKeys commands
User avatar
Ennovy
Posts: 58
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Apr 11th, ’14, 20:46

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
User avatar
Marko
Posts: 1051
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Apr 12th, ’14, 20:42

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
Ennovy
Posts: 58
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Apr 12th, ’14, 20:53

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
Posts: 20
Joined: Mar 18th, ’14, 08:46

Post by Guest » Sep 14th, ’14, 23:29

Cool idea, thanks for this useful command, just what I needed. :D
User avatar
Ennovy
Posts: 58
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Sep 15th, ’14, 08:43

Guest wrote:

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

Glad you like it :D
User avatar
Ennovy
Posts: 58
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Jan 7th, ’15, 10:28

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?
User avatar
Marko
Posts: 1051
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jan 7th, ’15, 12:06

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
Ennovy
Posts: 58
Joined: Mar 18th, ’14, 08:46

Post by Ennovy » Jan 7th, ’15, 13:42

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
User avatar
Marko
Posts: 1051
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Jan 8th, ’15, 07:28

Thanks Ennovy., will be resolved.
TokyoMike
Posts: 12
Joined: May 10th, ’18, 07:01

Post by TokyoMike » Mar 12th, ’19, 14:23

I am wondering if there is an easy way to change this to somehow allow me to switch resolutions on the fly.

1. Add a hotkey to the script to switch between two resolutions
2. Add a setup file or something you can edit easily to change the resolution

I found I could edit the Settings.fdb file to change the numbers to fit my screen. I switch from my laptop (1920 horizontal) to my monitor at work (3840 horizontal) and the script was correctly moving to the other side of the screen - halfway across my monitor. I can manually edit the fdb file (after using TaskManager to force Fastkeys to stop - I cannot reach the tray icon on my huge monitor with the numbers in the script for my small laptop screen) but I would like some easier way to swap numbers without have to force Fastkeys to exit in order to access the tray icon.

My case is a strange one and I can appreciate that. I figured I would ask for some direction - the script itself is working perfectly, it is my use case that is strange.

Thanks for any help anyone can provide!
Post Reply