Cursor movements get no stuck

Ask gaming related questions (AHK v1.1 and older)
L3Dice
Posts: 2
Joined: 07 Apr 2018, 10:37
Location: Lithuanian
Contact:

Cursor movements get no stuck

07 Apr 2018, 10:44

Watch this short video and plz, help me with this cool cursor movement action ...
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Cursor movements get no stuck

07 Apr 2018, 13:29

Not sure if this is simply SPAM :wtf: ???
L3Dice
Posts: 2
Joined: 07 Apr 2018, 10:37
Location: Lithuanian
Contact:

Re: Cursor movements get no stuck

07 Apr 2018, 13:47

This is no-spam, i wan to play games like PUBG on my computer with special android launcher, that's why i need this script or some program, which does this action, cursor movement around screen edge, like i said, like this snake ...
User avatar
Cuadrix
Posts: 236
Joined: 07 May 2017, 08:26

Re: Cursor movements get no stuck

07 Apr 2018, 13:59

So when you move the cursor and reach and edge, you want it to come from the opposite direction?
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Cursor movements get no stuck

08 Apr 2018, 04:09

Please use WinGetPos and tell us your width and height (of the emulator or application), this might be possible.
Or is this for your WHOLE screen??

Or run this script when game is open and it is in screen and active. Also tell us your emulator's wintitle if you want this script to work only in the emulator.

Code: Select all

WinGetPos , X, Y, Width, Height, A
Msgbox, Width = %Width% `nHeight = %Height%
return

If you want for WHOLE screen run this script: (Click F1 to start/stop move)

Code: Select all

CoordMode, Mouse, Screen
F1::
Toggle := !Toggle
If Toggle
    SetTimer, CheckMouse, 0
else
    SetTimer, CheckMouse, Off
return

CheckMouse:
MouseGetPos, CurrentX, CurrentY
If (CurrentX > A_ScreenWidth-5) 
    MouseMove, 6, %CurrentY%, 0
else If (CurrentX < 5)
    MouseMove, %A_ScreenWidth%-6, %CurrentY%, 0
If (CurrentY > A_ScreenHeight-5) 
    MouseMove, %CurrentX%, 6, 0
else If (CurrentY < 5)
    MouseMove, %CurrentX%, %A_ScreenHeight%-6, 0
return
Something is wrong.
else If (CurrentX < 5)
MouseMove, %A_ScreenWidth%-6, %CurrentY%, 0
and
else If (CurrentY < 5)
MouseMove, %CurrentX%, %A_ScreenHeight%-6, 0

are not functioning properly. Any clues?
I am your average ahk newbie. Just.. a tat more cute. ;)
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Cursor movements get no stuck

11 Apr 2018, 08:08

Trying to do this with MouseGetPos is pretty pointless if you want to read raw mouse input.
Sure you can keep moving the cursor to the middle of the screen, but why bother trying to make an absolute input method behave like a relative one, when there is a perfectly good way to read relative mouse movement data in the first place.
Just use MouseDelta
https://autohotkey.com/boards/viewtopic.php?t=10159
User avatar
Nwb
Posts: 444
Joined: 29 Nov 2016, 08:56

Re: Cursor movements get no stuck

11 Apr 2018, 08:13

evilC wrote:Trying to do this with MouseGetPos is pretty pointless if you want to read raw mouse input.
Sure you can keep moving the cursor to the middle of the screen, but why bother trying to make an absolute input method behave like a relative one, when there is a perfectly good way to read relative mouse movement data in the first place.
Just use MouseDelta
https://autohotkey.com/boards/viewtopic.php?t=10159
But why didn't it work for the full screen? For the most part I didn't follow what you meant by "you can keep moving the cursor to the middle fo the screen".. The MouseGetPos is to verify if the mouse is on either edges of the screen..

But nice function.
I am your average ahk newbie. Just.. a tat more cute. ;)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 71 guests