Sign in to follow this  
Followers 0
Schoening

On Mouseclick

10 posts in this topic

It's been quite a while that i have used AutoIt.

I'm just wondering if i can create this.

A programm that draws after my cordinates.

So my idea is that i create 2 Arrays. (with 50 for now) and every time i make a Mouseclick, while the function is running, i assign a new set of X,Y Arrays to that click. So click 1 X[0]Y[0] click 2 X[1]Y[1] etc.

But i have not found any "on mouseclick" feature.

Help :)

Share this post


Link to post
Share on other sites



There is function which you can use to mouse click: MouseClick ( "button" [, x, y [, clicks [, speed]]] ) but you will have to create the array of 50 then execute the function in a for loop of 50.

Share this post


Link to post
Share on other sites

Yeah i know MouseClick :) I have no problem once i got the Arrays Defined. But i want to define a array on Mouseclick to be X,Y of the Mouseclicks location.

Share this post


Link to post
Share on other sites

Yeah i know MouseClick :) I have no problem once i got the Arrays Defined. But i want to define a array on Mouseclick to be X,Y of the Mouseclicks location.

That is not possible by the that function, the only way to go with this would be to execute in a loop. ;)

Share this post


Link to post
Share on other sites

Yeah but how can i track the mouses location? i gotta give the script some input to set the arrays to mouse.X and mouse.Y

Share this post


Link to post
Share on other sites

Yeah but how can i track the mouses location? i gotta give the script some input to set the arrays to mouse.X and mouse.Y

Ok, we will have to use a event "$GUI_EVENT_PRIMARYDOWN" so we know when you click and then MouseGetPos ( [dimension] ) function to get the co-ordinates, then set them to the array.

Share this post


Link to post
Share on other sites

thx ill try it :)

Share this post


Link to post
Share on other sites

Cool ^^ ill try that 2. Bit busy because i have to create a freaking game from scratch in one week ^^ Ill let you know when i have tried this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0