The Mouseclick function of Autoit closes the script

Asked

Viewed 28 times

1

I created a HotKeySet in Autoit, but when I use the Mouseclick function, it is closing the script. Follow the following code:

HotKeySet("^9", "clicar")  

func clicar()  
   MouseClick($MOUSE_CLICK_LEFT, 8, 40, 1, 1)  
EndFunc  

1 answer

0

I solved as follows: I created the variables within the function:

func click() $x=8 $y=40

Mouseclick("left", $x, $y, 1, 1)
Endfunc

Since the last two parameters are the amount of click (1) and the speed the mouse goes to the coordinates x and y (0, that is, immediately).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.