MouseMove doesn't work in function()
Posted: 01 Jan 2024, 13:01
Hi!
I have a basic script where mouse moves to certain location and then clicks. I use strings to set the coords. And the problem is that mouse doesn't move when i use strings in the code:
I have a basic script where mouse moves to certain location and then clicks. I use strings to set the coords. And the problem is that mouse doesn't move when i use strings in the code:
Code: Select all
x1 := 640
y1 := 355
$F1::Function()
Function()
{
BlockInput, MouseMove
Send {RButton}
Send {ESC}
Sleep, 50
MouseMove, %x1%, %y1%, 0
Send {click}
Sleep, 50
BlockInput, MouseMoveOff
}
return
The script works fine when i don't use strings to set the coords:
How to pass string variables to function to make it work?