You can use variables or expressions with virtually every parameter of every command... It is shown throughout the documentation, and explained in a few places.
For Menu Add specifically, it explicitly says that LabelOrSubmenu can be "a single variable reference containing a function object. For example, %FuncObj% or % FuncObj." This is in the paragraph that swagfag linked to. However, you don't have to use a function object; the variable can contain whatever value you would be passing literally (a function or label name).
Use menu with different handlers? Topic is solved
-
- Posts: 78
- Joined: 06 May 2017, 11:07
Re: Use menu with different handlers?
Yes, this is what I didn't know. Function objects are more complicated than just simple labels. I ended up using a label that I keep together with the "save to favs" function, and not the "build the menu" function. It works like a charm. Thanks again!lexikos wrote: ↑14 Aug 2022, 20:00You can use variables or expressions with virtually every parameter of every command... It is shown throughout the documentation, and explained in a few places.
For Menu Add specifically, it explicitly says that LabelOrSubmenu can be "a single variable reference containing a function object. For example, %FuncObj% or % FuncObj." This is in the paragraph that swagfag linked to. However, you don't have to use a function object; the variable can contain whatever value you would be passing literally (a function or label name).