Newbie2 Posted June 21, 2004 Share Posted June 21, 2004 Is it possible to perform a "WinExists" on a Tooltip in order to see if it exists? Link to comment Share on other sites More sharing options...
Valik Posted June 21, 2004 Share Posted June 21, 2004 Yes. However, I'm not sure if you can detect a non-visible Tooltip or not. The title for a tooltip is whatever text it will display. Link to comment Share on other sites More sharing options...
Newbie2 Posted June 21, 2004 Author Share Posted June 21, 2004 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. Any suggestions? Link to comment Share on other sites More sharing options...
Valik Posted June 21, 2004 Share Posted June 21, 2004 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 More sharing options...
Newbie2 Posted June 21, 2004 Author Share Posted June 21, 2004 Valik, I'm not sure I got it. Do you say that I cannot use PixelGetColor on a tooltip since it is not visible? Link to comment Share on other sites More sharing options...
pekster Posted June 21, 2004 Share Posted June 21, 2004 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 More sharing options...
Guest Guest Posted June 21, 2004 Share Posted June 21, 2004 Got it, pekster. 10x Link to comment Share on other sites More sharing options...
Newbie2 Posted June 21, 2004 Author Share Posted June 21, 2004 BTW - is it difficult to change the background color of a tooltip or SplashtextOn? 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