Code: Select all
MyMenu.Add(index, Func("ShowMenuWrapper"))
Code: Select all
ShowMenuWrapper := Func("ShowMenu").Bind(catToShow . "\\" . index)
MyMenu.Add(index, ShowMenuWrapper)
Why can't I use Func()?
Code: Select all
MyMenu.Add(index, Func("ShowMenuWrapper"))
Code: Select all
ShowMenuWrapper := Func("ShowMenu").Bind(catToShow . "\\" . index)
MyMenu.Add(index, ShowMenuWrapper)
Ok, thanks! I already completed the script using alternative methods, but this Func() thing comes up often, and has been buggin me! So, I saved this info, and I'll use it next time. Thank you!mikeyww wrote: ↑29 Apr 2024, 11:12You can do this in v2 but without the Func syntax. Examining the documentation shows the way.
https://www.autohotkey.com/docs/v2/lib/Func.htm#Bind
V1: BoundFunc := Func.Bind(Param1, Param2, ...)
V2: BoundFunc := FuncObj.Bind(Param1, Param2, ...)
Example
Users browsing this forum: DavidP, FanaticGuru, Noesis and 104 guests