Schoening Posted February 20, 2012 Posted February 20, 2012 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
Guest Posted February 20, 2012 Posted February 20, 2012 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.
Schoening Posted February 20, 2012 Author Posted February 20, 2012 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.
Guest Posted February 20, 2012 Posted February 20, 2012 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.
Schoening Posted February 20, 2012 Author Posted February 20, 2012 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
Guest Posted February 20, 2012 Posted February 20, 2012 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.YOk, 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.
somdcomputerguy Posted February 20, 2012 Posted February 20, 2012 Try this out too.. Function _IsPressed - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
Xandy Posted February 20, 2012 Posted February 20, 2012 (edited) #include <misc.au3> if _ispressed("01") then; this says is left mouse down 0/1 beep() $mxy= MouseGetPos();$mxy[0] is mouse x, $mxy[1] is mouse y endif Edited February 20, 2012 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Schoening Posted February 20, 2012 Author Posted February 20, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now