Add auto-hide timeout for Tooltip

Propose new features and changes
william_ahk
Posts: 496
Joined: 03 Dec 2018, 20:02

Add auto-hide timeout for Tooltip

20 Feb 2024, 02:03

Implement an auto-hide timeout parameter so that we don't have to use SetTimer or a custom function like below to hide it. I think it's frequent enough we need to hide the tooltip. This is especially helpful for new users.

Code: Select all

Tip(Text := "", Time := 1500, X?, Y?) {
	Tooltip(Text, X?, Y?, 20)
	SetTimer () => Tooltip(,,,20), -Time
}
My suggestion for the parameter:
ToolTip [Text, X, Y, WhichToolTip-or-Timeout]
WhichToolTip-or-Timeout
Type: Integer
If omitted, it defaults to 1 (the first tooltip). Otherwise, specify a number between 1 and 20 to indicate which tooltip to operate upon when using multiple tooltips simultaneously. If the number is greater than 20, it will be taken as the delay in milliseconds before hiding the tooltip. The tooltip being operated upon will be unnumbered and outside the set of 20 tooltips.
User avatar
DataLife
Posts: 458
Joined: 29 Sep 2013, 19:52

Re: Add auto-hide timeout for Tooltip

Today, 01:40

On 4 of my scripts I use tooltips extensively to display what the script is currently doing. Creating a timer and label for each new tooltip is a hassle.

A timeout would so much simplify things.
Check out my scripts. (MyIpChanger) (ClipBoard Manager) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
byzod
Posts: 89
Joined: 21 Jun 2021, 06:46

Re: Add auto-hide timeout for Tooltip

Today, 11:10

Code: Select all

TimedToolTip(content, life:=0, x?, y?, whichToolTip:=1){
	life := life < 0 ? 0 : life
	ToolTip(content, x?, y?, whichToolTip)
	SetTimer(()=>ToolTip("", , , whichToolTip), -life)
}

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 49 guests