Alternatives Mousemove coordinates

Ask gaming related questions (AHK v1.1 and older)
Gonzalo94
Posts: 40
Joined: 17 Jul 2017, 12:56

Alternatives Mousemove coordinates

26 Nov 2018, 11:30

Have a little question guys, if anyone can help i will be very gratefull.

Can you put on this code 2 or 3 random mousemove alternatives ? for example, Mousemove to X,Y, or this other X,Y or this X,Y.
The use of one or other will be just random

Here is my code guys

f9::
Send {F5}{F10}{ScrollLock}
BlockInput, MouseMove
SetMouseDelay, -1
CoordMode, Mouse, Window
MouseMove, 625, 446, 0
KeyWait, LButton, D
Send {F12}{F7}
BlockInput, MouseMoveOFF
return
Rohwedder
Posts: 7672
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Alternatives Mousemove coordinates

27 Nov 2018, 13:04

Hallo,
try:

Code: Select all

X:={1:625,2:200,3:400}
Y:={1:446,2:100,3:200}
f9::
Send {F5}{F10}{ScrollLock}
BlockInput, MouseMove
SetMouseDelay, -1
CoordMode, Mouse, Window
Random, rand, 1, 3
MouseMove,% X[rand], Y[rand], 0
KeyWait, LButton, D
Send {F12}{F7}
BlockInput, MouseMoveOFF
return
Gonzalo94
Posts: 40
Joined: 17 Jul 2017, 12:56

Re: Alternatives Mousemove coordinates

27 Nov 2018, 13:09

Rohwedder wrote:
27 Nov 2018, 13:04
Hallo,
try:

Code: Select all

X:={1:625,2:200,3:400}
Y:={1:446,2:100,3:200}
f9::
Send {F5}{F10}{ScrollLock}
BlockInput, MouseMove
SetMouseDelay, -1
CoordMode, Mouse, Window
Random, rand, 1, 3
MouseMove,% X[rand], Y[rand], 0
KeyWait, LButton, D
Send {F12}{F7}
BlockInput, MouseMoveOFF
return
THANKS U VERY MUCH! SOLVED
Gonzalo94
Posts: 40
Joined: 17 Jul 2017, 12:56

Re: Alternatives Mousemove coordinates

27 Nov 2018, 13:15

Rohwedder wrote:
27 Nov 2018, 13:04
Hallo,
try:

Code: Select all

X:={1:625,2:200,3:400}
Y:={1:446,2:100,3:200}
f9::
Send {F5}{F10}{ScrollLock}
BlockInput, MouseMove
SetMouseDelay, -1
CoordMode, Mouse, Window
Random, rand, 1, 3
MouseMove,% X[rand], Y[rand], 0
KeyWait, LButton, D
Send {F12}{F7}
BlockInput, MouseMoveOFF
return
Just a little question friend,
this part is right

Random, rand, 1, 3

because i feel that is working just 1 and 3 option without the second alternative
Rohwedder
Posts: 7672
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Alternatives Mousemove coordinates

27 Nov 2018, 15:11

Hallo,
try:

Code: Select all

Loop, 1000
{
	Random, rand, 1, 3
	R%rand%++
	ToolTip,% R1 " " R2 " " R3
	Sleep, 50
}
MsgBox,% R1 " " R2 " " R3
Gonzalo94
Posts: 40
Joined: 17 Jul 2017, 12:56

Re: Alternatives Mousemove coordinates

27 Nov 2018, 18:07

Rohwedder wrote:
27 Nov 2018, 15:11
Hallo,
try:

Code: Select all

Loop, 1000
{
	Random, rand, 1, 3
	R%rand%++
	ToolTip,% R1 " " R2 " " R3
	Sleep, 50
}
MsgBox,% R1 " " R2 " " R3
First, thank you very very much for the help!
second, u put that in the end of the code right?
Rohwedder
Posts: 7672
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Alternatives Mousemove coordinates

28 Nov 2018, 01:57

Hallo,
"u put that in the end of the code right?"
The code snippet (Loop, 1000...) was not meant for your game!
It shows the quality of (Random, rand, 1, 3).

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: DianeWREWS, Google [Bot] and 72 guests