Jump to content

ToolTip


Recommended Posts

10x, Valik.

I have decided to use PixelGetColor function to check if a tooltip exists, I have observed that when I use the AutoIt Window Spy and put the mouse on the yellow, I don't get the same decimal value of color when I move the cursor on the off the yellow. :D

Any suggestions?

Link to comment
Share on other sites

I can change the color of Tooltips at will, as can any user, so I wouldn't recommend using PixelGetColor() unless you plan to get the proper color at run-time.

And, as I suspected, AutoIt can't see a non-visible tooltip.

ToolTip("Line of text")
ToolTip("")
$hWnd = WinGetHandle("Line of text")
MsgBox(4096, "", $hWnd)

This shows an empty string. Comment out the 'ToolTip("")' line and it will return the HWND correctly.

So, if you know what text the tooltip will display, you can try WinExists() on that text, then when the tip is visible, it should return true.

Link to comment
Share on other sites

I'm not sure I got it. Do you say that I cannot use PixelGetColor on a tooltip since it is not visible?

No, he's saying that you shouldn't plan on the color of the tooltips being the same. For example, my theme displays tooltips with a dark blue background and red text. Even if you planned on checking the color when you ran your script to get the proper color values, you still can't count on the font being the same for tooltip displays, so you might think you have the background color of the tooltip, but it might be the text color. Lastly, what's to prevent someone from using the same color as the tooltip background elsewhere on thier system (say, in their desktop pattern, or wherever) ?

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

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...