Mouse hotkey script problem

Ask gaming related questions (AHK v1.1 and older)
DeadHead1984
Posts: 4
Joined: 04 Jun 2018, 21:49

Mouse hotkey script problem

06 Jun 2018, 19:55

I have this script, it works for a game if I play it offline, no problem but when I play online after a couple hotkey mouse clicks it quits working and the normal mouse clicks quit working as well.

Also I have tried to run it in the game, in window mode but the script does not work correctly when I do.

I run script in admin mode..

I use a Logitech g series mouse..

The script moves mouse ,clicks at x,y, then moves mouse back to original position by pressing Z

Here is the script if someone can help. Thanks


z::Code()

Code()
{
CoordMode, Mouse, Screen
MouseGetPos, px, py
MouseClick, left, 546, 317, 1
Sleep, 200}
Mousemove %px%,%py%, 1
Sleep, 20}
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Mouse hotkey script problem

08 Jun 2018, 11:37

Code: Select all

Code()
{
CoordMode, Mouse, Screen
MouseGetPos, px, py
MouseClick, left, 546, 317, 1
Sleep, 200}  ; Function ends here!!
Mousemove %px%,%py%, 1		; Not part of function !
Sleep, 20}					; Not part of function !
Mismatching { braces } (One { but two })
DeadHead1984
Posts: 4
Joined: 04 Jun 2018, 21:49

Re: Mouse hotkey script problem

09 Jun 2018, 09:52

Thank you I will type this in and give it a try

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: hiahkforum, phalanxdarken and 112 guests