leuce Posted May 24, 2008 Posted May 24, 2008 G'day everyone I'm running AutoIt scripts on a program that has an edit pane but no helpful control names etc. The program is OmegaT, by the way. I need to click with my mouse in a certain place, but the only way I can reference that place, is to say that it is 10 pixels above the cursor position. I mean, the exit box has a blinking cursor in it, and I need to find the pixel position of that cursor. As mentioned, the edit pane itself doesn't have a control name (the app OmegaT is written in Java, see). Any ideas about how to get the cursor position? I was hoping for something along the lines of MouseGetPos, but if it aint that simple, I can improvise. Thanks! Samuel
Muchuchu Posted May 24, 2008 Posted May 24, 2008 Lol I can across this problem a while ago if I am understanding it correctly. $arr1 = mousegetpos() mouseclick($arr1[0],$arr2[1] + 10) Like that?
Bowmore Posted May 24, 2008 Posted May 24, 2008 (edited) G'day everyoneI'm running AutoIt scripts on a program that has an edit pane but no helpful control names etc. The program is OmegaT, by the way. I need to click with my mouse in a certain place, but the only way I can reference that place, is to say that it is 10 pixels above the cursor position. I mean, the exit box has a blinking cursor in it, and I need to find the pixel position of that cursor. As mentioned, the edit pane itself doesn't have a control name (the app OmegaT is written in Java, see).Any ideas about how to get the cursor position? I was hoping for something along the lines of MouseGetPos, but if it aint that simple, I can improvise.Thanks!SamuelWinGetCaretPos ( ) should report the coordinates of the blinking caret. However the hepl file says some applications may not report the correct value, so I guess you will just have to try it to see if it works. Edited May 24, 2008 by Bowmore "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
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