Cajun Posted April 16, 2007 Share Posted April 16, 2007 I'm needing to determine mouse position (x,y) coordinates so I can use an Auto IT script I presently have. However some of the data is slightly skewed so I have to update the positions. I'll be running this in another program so I will be clicking on the screen to activate certain things. I was wanting an idea on how I could do this by determining position on mouse click and mouse drag....In other words a script to run in the background and capture mouse clicks and drags while I'm in another program...once I have the updated positions...I can put them in the original Auto IT script. Any ideas? Thanks. Link to comment Share on other sites More sharing options...
Apocalypse Posted April 16, 2007 Share Posted April 16, 2007 Unless I misunderstand the question: To Get Position: MouseGetPos ( [dimension] ) Dimension: None: Returns a two-element array that containing the mouse coordinates: $array[0] = X coord (horizontal), $array[1] = Y coord (vertical) 0: Returns the X co-ordinate as an integer. 1: Returns the Y co-ordinate as an integer. Link to comment Share on other sites More sharing options...
Cajun Posted April 16, 2007 Author Share Posted April 16, 2007 No, I think you understand just fine...and in fact I guess I didn't expand on it greatly enough. Can I build a "trigger" so that when I click or click and drag on a window in my program....it'll send that information to the AutoIT script running and store it somewhere...say in a text file...so that I can go back..open the text file and put the information back in the "using" AutoIT script? If so...how would I do that? I understand the "on click portion" to create the trigger...that would send me into the MouseGetPos...but can I write that to a file that I can read with my eyes...to put that data in the IT script I need to do the work? Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 16, 2007 Share Posted April 16, 2007 If so...how would I do that? I understand the "on click portion" to create the trigger...that would send me into the MouseGetPos...but can I write that to a file that I can read with my eyes...to put that data in the IT script I need to do the work?The X/Y coordinates are simple integers, you may also want to save the current option for MouseCoordMode. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
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