Jump to content

get text from mouseover?


Recommended Posts

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.

Link to comment
Share on other sites

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 by pieeater

[spoiler]My UDFs: Login UDF[/spoiler]

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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]", "")

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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 by pieeater

[spoiler]My UDFs: Login UDF[/spoiler]

Link to comment
Share on other sites

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()

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...