step by step. today much often with your help. thanks.
Code: Select all
loop,3
toolTipGui1 := toolTipGui(x,y,A_Tickcount ":" A_ScriptName)
Code: Select all
GuiControl, , % HGUI, text ; update text
; ^--- not working
GuiControl, , % "ahk_id " HGUI, text ; update text
; ^--- not working
Code: Select all
;/¯¯¯¯ toolTipGui ¯¯ 190214201449 ¯¯ 14.02.2019 20:14:49 ¯¯\
; https://www.autohotkey.com/boards/viewtopic.php?f=76&t=62024&p=263617#p263617
; Gui1 := toolTipGui(10,10,"1 1 1 1") ; toolTipGui(x, y, text, title := "", bgColor := "", fontSize := 0)
; GuiControl, , % Gui1.HTXT, 11111111
; Gui2 := toolTipGui(10,100,"2 2 2 2")
toolTipGui(x, y, text, title := "", bgColor := "", fontSize := 0){
if(!title)
title := "title1902121943"
if(!bgColor)
bgColor := "Green"
if(!fontSize)
fontSize := 10
DetectHiddenWindows,Off
settitlematchmode,3
; ahk_class AutoHotkeyGUI ahk_exe AutoHotkey.exe
; UniqueID := WinExist(WinTitle , WinText, ExcludeTitle, ExcludeText)
titleClass := title " ahk_class AutoHotkeyGUI ahk_exe AutoHotkey.exe"
If( HGUI := WinExist( titleClass )){ ; eturns the Unique ID (HWND) (
GuiControl, , % HGUI, text ; update text
; ^--- not working
GuiControl, , % "ahk_id " HGUI, text ; update text
; ^--- not working
WinMove, % titleClass, , % x , % y - 30 ; - 15
; msgbox, % HGUI " was found: " titleClass " at x,y ? " x "," y
;WinMove, A,, 10, 10,
Gui1 := {HGUI: HGUI, HTXT: text} ; HTXT???????????????
return {HGUI: HGUI, HTXT: text}
}
;msgbox, % HGUI " was NOT: " titleClass " at x,y ? " x "," y
; Gui, New, +AlwaysOnTop +ToolWindow -SysMenu -Caption +HwndHGUI
Gui, New, +ToolWindow -SysMenu -Caption +HwndHGUI
Gui, Color, %bgColor%
Gui, Font, cWhite s%fontSize% q1, Arial Narrow ;red ; changed s11 to s10
Gui, Add, Text, y0 hwndHTXT, %text%
; Return {HGUI: HGUI, HTXT: HTXT} ; Gui1 := toolTipGui()
Gui1 := {HGUI: HGUI, HTXT: HTXT}
Gui, % Gui1.HGUI . ":Show", NoActivate x%x% y%y% , % title
tooltip,WinWait4564213
WinWait,% title
tooltip,
return Gui1 ; older:
}
;\____ toolTipGui __ 190214201453 __ 14.02.2019 20:14:53 __/