#include <GUIConstantsEx.au3>
#include <ToolTip_UDF.au3>
Global $aBut[11] = [10], $iShowTime = Random(1, 20, 1), $iShowTimeOld
GUICreate('Test', 170, 440)
$nInput = GUICtrlCreateInput($iShowTime, 35, 10, 50, 20)
$nUpDown = GUICtrlCreateUpdown($nInput)
GUICtrlSetLimit(-1, 20, 1)
For $i = 1 To $aBut[0]
$aBut[$i] = GUICtrlCreateButton('Test ' & $i, 35, 40 + ($i - 1) * 40, 100, 30)
_ToolTip_SetText($aBut[$i], 'Подсказка № ' & $i)
Next
GUISetState()
_ToolTip_SetShowTime($iShowTime * 1000)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $nUpDown
$iShowTime = GUICtrlRead($nInput)
If $iShowTimeOld <> $iShowTime Then
$iShowTimeOld = $iShowTime
;ConsoleWrite($iShowTimeOld & @LF)
_ToolTip_SetShowTime($iShowTimeOld * 1000)
EndIf
Case $aBut[1] To $aBut[$aBut[0]]
MsgBox(64, 'Info', 'Нажата кнопка "' & GUICtrlRead($nMsg) & '"')
EndSwitch
WEnd