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)
}
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)
}
It's neededmikeyww wrote: ↑02 Dec 2023, 06:57You have it!
Braces below #HotIf are not needed and should be removed, as directives do not use bounding braces.
Code: Select all
#Requires AutoHotkey v2.0 #HotIf WinActive('ahk_class CabinetWClass') && !ProcessExist('MacroRecorder2.exe') F1:: { ; Suspend MsgBox 123 } #HotIf
Code: Select all
#Requires Autohotkey v2.0+
Fun1 := arg=>msgbox(arg)
FunArr := [Fun1]
Handler := {fn: Fun1}
Fun1(1) ; 1 / 1
FunArr.Get(1)(2) ; 2 / 2
Handler.fn.call(3) ; 3 / 3
Handler.fn(3) ; 3 / Error: Too many parameters passed to function.