sigil Posted July 18, 2011 Posted July 18, 2011 Hi all, I'm trying to automate a GIS application that displays a small text box whenever I mouse over certain points on a map. I'd like to collect the text from the box that pops up for a given set of screen coordinates. This is not a web-based app, so there's no sourcecode to search for Javascript-based mouseover events. I've looked through AutoIt help but couldn't find a function that will return this info. Hopefully I'm just overlooking something obvious...any ideas? Either reading the text for a passed coordinate pair, or just getting it from the mouse's current position, would both be acceptable.
pieeater Posted July 18, 2011 Posted July 18, 2011 (edited) you could try: if $xCoord >= $leftcoord And $xCoord <= $rightcoord And $yCoord >= $topcoord And $yCoord <= $bottemcoord then tooltip();i cant remember the syntax off the top of my head, look it up in the help file its a bit long but it should work. now use mousegetpos() to get the x and y coords for the cursor Edited July 18, 2011 by pieeater [spoiler]My UDFs: Login UDF[/spoiler]
sigil Posted July 18, 2011 Author Posted July 18, 2011 you could try: if $xCoord >= $leftcoord And $xCoord <= $rightcoord And $yCoord >= $topcoord And $yCoord <= $bottemcoord then tooltip();i cant remember the syntax off the top of my head, look it up in the help file its a bit long but it should work. now use mousegetpos() to get the x and y coords for the cursor Not exactly what I'm looking for. I don't want to create a tooltip; I want to capture the text of existing tooltips associated with various cursor positions.
tlman12 Posted July 18, 2011 Posted July 18, 2011 Not exactly what I'm looking for. I don't want to create a tooltip; I want to capture the text of existing tooltips associated with various cursor positions. purely a guess, i tested it with autoit tooltips and it works but i'm not sure if the tooltips from your GIS program would be the same. WinGetTitle("[CLASS:tooltips_class32]", "")
sigil Posted July 18, 2011 Author Posted July 18, 2011 purely a guess, i tested it with autoit tooltips and it works but i'm not sure if the tooltips from your GIS program would be the same. WinGetTitle("[CLASS:tooltips_class32]", "") I haven't been able to get it to work. I think I'll find a way to pull what I need from the back end data source. Thanks for working on it, nonetheless.
pieeater Posted July 18, 2011 Posted July 18, 2011 (edited) sorry, i thought you wanted to display a note above it or something like that. im not sure how you would isolate the text that your trying to get using coordinates. but you could use WinGetText() to get the text Edited July 18, 2011 by pieeater [spoiler]My UDFs: Login UDF[/spoiler]
monoscout999 Posted July 19, 2011 Posted July 19, 2011 you can get the window handle and from there you can get the title or the text of the window or the control, like the autoit window info tool. there`s a couple of API to do that. You need. Get the mouse position.. MouseGetPos() Get the window handle.. _WinAPI_WindowFromPoint() Get the window text or title WinGetTitle() WinGetText() Or you can seek the children windows looking for the controls of a window.. Or directly use this function that comes with the WinAPIEx.au3 UDF _WinAPI_ChildWindowFromPointEx()
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