Jump to content

Recommended Posts

Posted

Hi,

I'm trying to read the tool tips on an existing SysTreeView32 class.

Is there a command in ControlTreeView that will retrieve the current tool tip?

$hSTV1 = ControlGetHandle($hWnd, "", "[CLASS:SysTreeView32;INSTANCE:3]") ; get the tree

The above code gets a valid handle and the below code displays the text for the 2 items. That works ok.

MsgBox($MB_SYSTEMMODAL, "Title","a " & ControlTreeView($hWnd,"", $hSTV1, "getText","#0"))
  MsgBox($MB_SYSTEMMODAL, "Title","b " & ControlTreeView($hWnd,"", $hSTV1, "getText","#1"))

Any hints on what I should try next to get the existing tool tip text?

PS I tried using WinList("[CLASS:tooltips_class32]") but that did not return any results.

Thanks,

Jared

Posted

Thanks for the reply.

It is an existing tree not created using the _GUICtrlTreeView family.

I tried this , it returned 0 which I think means "control is not using tool tips." But there are tool tips.

$hSTV1 = ControlGetHandle($hWnd, "", "[CLASS:SysTreeView32;INSTANCE:3]")
$firstH = _GUICtrlTreeView_GetFirstItem ( $hSTV1 )
MsgBox($MB_SYSTEMMODAL, "Title","m " &  _GUICtrlTreeView_GetToolTips ($firstH))

 

Posted
31 minutes ago, Jdavis22 said:

It is an existing tree not created using the _GUICtrlTreeView family.

it works the same way

put ConsoleWrite to control the flow
you have a value in $firstH ?
you have a value in $Text ?
you have a value in $hTooltip?
... and so on

$hSTV1 = ControlGetHandle($hWnd, "", "[CLASS:SysTreeView32;INSTANCE:3]")
ConsoleWrite("$hSTV1=" & $hSTV1 & @CRLF)

$firstH = _GUICtrlTreeView_GetFirstItem ( $hSTV1 )
ConsoleWrite("$firstH=" & $firstH & @CRLF)

$Text =  _GUICtrlTreeView_GetText($hSTV1, $firstH)
ConsoleWrite("$Text=" & $Text & @CRLF)

$hTooltip = _GUICtrlTreeView_GetToolTips ($firstH)
ConsoleWrite("$hTooltip=" & $hTooltip & @CRLF)

if not, try with the directive #AutoIt3Wrapper_UseX64=y
(if you have it installed the SciTE4AutoIt3.exe )

I know that I know nothing

Posted

Thanks again. I did not know that.

I'm running it from cmd box using autoid3_x64.exe, so consoleWrite does not work for me. I just use a msgbox for now.

Everything is valid except the GetToolTips returns 0x0000...

 

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
  • Recently Browsing   0 members

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