ein Tooltipfenster hat zwar keine Titelleiste aber trotzdem einen Titel.
Code: Select all
q::
ToolTip, ToolTip-Text
WinGetTitle, Titel, ahk_class tooltips_class32
MsgBox,, der Titel des ToolTips lautet,% Titel
Return
Bug or Feature?
Moderator: jNizM
Code: Select all
q::
ToolTip, ToolTip-Text
WinGetTitle, Titel, ahk_class tooltips_class32
MsgBox,, der Titel des ToolTips lautet,% Titel
Return
Code: Select all
...
actWin := WinExist("A") ; <<< set LastFoundWindow
if Ctrl_FollowMouse
{
curWin := msWin
curCtrl := msCtrl
WinExist("ahk_id " curWin)
}
else
{
curWin := actWin
ControlGetFocus, curCtrl
}
WinGetTitle, t1 ; <<< get title of LastFoundWindow, which was an ACTIVE window
...
Bug or Feature?
Code: Select all
...
actWin := WinExist("A") ; <<< set LastFoundWindow to be the ACTIVE window
if Ctrl_FollowMouse
{
curWin := msWin
curCtrl := msCtrl
WinExist("ahk_id " curWin) ; <<< set LastFoundWindow to be the CURRENT window
}
else
{
curWin := actWin
ControlGetFocus, curCtrl
}
WinGetTitle, t1 ; <<< get title of LastFoundWindow, which was the CURRENT or ACTIVE window
...
a tooltip doesnt have a caption and is in another process, so t1 := ""Copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve the text of a control in another application.
If the target window is owned by another process and has a caption, GetWindowText retrieves the window caption text. If the window does not have a caption, the return value is a null string. This behavior is by design.