Is something wrong with my script?

Ask gaming related questions (AHK v1.1 and older)
Unaash
Posts: 3
Joined: 04 Oct 2017, 12:33

Is something wrong with my script?

04 Oct 2017, 12:41

I'm very new to AHK, but i wanted to make a script for a game that i play.

The script is this
7::
Send {Shift down}{LButton down}
Send {Shift up}{LButton up}
CoordMode, Mouse, Screen
MouseGetPos, px, py
Mousemove, 5, 5, R
Sleep, 250
MouseClick, left
Mousemove, px,py, R
Sleep, 250
MouseClick, left
return

As I said i'm new to AHK so i looked around for help making this script and everything seems to be working properly for me except the MouseMove. No matter what value i put in it will always move my mouse to the top left corner of the window i'm in and it does the same at the desktop. Im not too sure if this is a bug or if something is wrong with my script but any help would be appreciated. Thanks
User avatar
rommmcek
Posts: 1475
Joined: 15 Aug 2014, 15:18

Re: Is something wrong with my script?

04 Oct 2017, 16:10

This might help you: Mousemove, 5, 5,, R
P.s.: This is wrong forum!
User avatar
Reloaded
Posts: 283
Joined: 25 Aug 2017, 08:48

Re: Is something wrong with my script?

08 Oct 2017, 15:06

Unaash wrote:I'm very new to AHK, but i wanted to make a script for a game that i play.

The script is this
7::
Send {Shift down}{LButton down}
Send {Shift up}{LButton up}
CoordMode, Mouse, Screen
MouseGetPos, px, py
Mousemove, 5, 5, R
Sleep, 250
MouseClick, left
Mousemove, px,py, R
Sleep, 250
MouseClick, left
return

As I said i'm new to AHK so i looked around for help making this script and everything seems to be working properly for me except the MouseMove. No matter what value i put in it will always move my mouse to the top left corner of the window i'm in and it does the same at the desktop. Im not too sure if this is a bug or if something is wrong with my script but any help would be appreciated. Thanks
You did the MouseMove wrong.

So its fine :P

Code: Select all

7::
Send {Shift down}{LButton down}
Send {Shift up}{LButton up}
CoordMode, Mouse, Screen
MouseGetPos, px, py
Mousemove, 5, 5, 50, R
Sleep, 250
MouseClick, left
Mousemove, px,py, R
Sleep, 250
MouseClick, left
return
Unaash
Posts: 3
Joined: 04 Oct 2017, 12:33

Re: Is something wrong with my script?

15 Oct 2017, 10:08

Thanks for the Help Reloaded and Rommmcek, and sorry for posting on the wrong forum as I said i'm very new to this and i greatly appreciate the help.
Unaash
Posts: 3
Joined: 04 Oct 2017, 12:33

Re: Is something wrong with my script?

15 Oct 2017, 10:08

Thanks for the Help Reloaded and Rommmcek, and sorry for posting on the wrong forum as I said i'm very new to this and i greatly appreciate the help.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 95 guests