pixelsearch Posted October 25, 2020 Share Posted October 25, 2020 Hi everybody I display a tooltip using the native command ToolTip("text", ...) Then the "AutoIt Window Info utility" shows this : Is it possible to get the size coords in a script ? (163, 18 in the precedent pic) The only thing I can retrieve is the handle of the tooltip, with this code placed immediately after the Tooltip() command : Local $aTooltip = WinList("[CLASS:tooltips_class32]") If IsArray($aTooltip) And $aTooltip[0][0] <> 0 Then ConsoleWrite($aTooltip[1][0] & " " & $aTooltip[1][1] & @lf) EndIf It will display the tooltip text + its handle (3 mousewheel => 3 tooltips, each mousewheel resizing the same pic) 454 / 454 --> 590 / 590 0x001D08E8 454 / 454 --> 580 / 580 0x001F08E8 454 / 454 --> 560 / 560 0x002108E8 How to retrieve the size of a native tooltip when you only got its handle ? Thanks Link to comment Share on other sites More sharing options...
Nine Posted October 25, 2020 Share Posted October 25, 2020 _WinAPI_GetWindowRect ? pixelsearch 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
pixelsearch Posted October 25, 2020 Author Share Posted October 25, 2020 Thanks Nine, it works fine Link to comment Share on other sites More sharing options...
pixelsearch Posted November 23, 2020 Author Share Posted November 23, 2020 Here is a little script showing the detailed infos of a tooltip, maybe it could be useful to a user in need. #include <MsgBoxConstants.au3> #include <WinAPISysWin.au3> ToolTip("Text of this Tooltip ", @DesktopWidth / 2, 280, "", 0, 2) Local $aToolTip = WinList("[CLASS:tooltips_class32]") If IsArray($aToolTip) And $aToolTip[0][0] <> 0 Then Local $aTag = _WinAPI_GetWindowRect($aTooltip[1][1]) ; thx Nine Msgbox($MB_TOPMOST, "Infos about this ToolTip", _ "Win Title" & @TAB & " : " & $aTooltip[1][0] & @CRLF & _ "Handle" & @TAB & " : " & $aTooltip[1][1] & @CRLF & _ "Left" & @TAB & " : " & DllStructGetData($aTag, "Left") & @CRLF & _ "Top" & @TAB & " : " & DllStructGetData($aTag, "Top") & @CRLF & _ "Right" & @TAB & " : " & DllStructGetData($aTag, "Right") & @CRLF & _ "Bottom" & @TAB & " : " & DllStructGetData($aTag, "Bottom") & @CRLF) Else Msgbox($MB_TOPMOST, "Infos about this ToolTip", "No infos... something went wrong") EndIf ToolTip("") 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