@hideifpath behaviour

Regardless of which of the the first two statements is commented out, the associated test button is never hidden.

@hideifpath:*\Windows\* //@hideifpath:!*\Windows\* Help ABOUT
If two buttons are created as follows without a commented statement, the second one is hidden.

@hideifpath:*\Windows\* Help ABOUT

@hideifpath:!*\Windows\* Help ABOUT
I'd also like to understand how the current source path is determined (or set). In the preceding examples the second button is always hidden whether or not the current tab is C:\Windows.

Regards, AB :confused:

Processing of the function modifiers stops when a line not beginning with @ is encountered, so if you comment out the top line it won't even look at the second one. We'll change it so that comments are ignored and skipped over.

Regarding your other questions: *\Windows* doesn't match C:\Windows, it only matches child folders of C:\Windows.

Thanks for pointing out my flawed *\Windows* expectations. :smiley:

What I am really after is a way to create a button that will be hidden if a path is not found. For example...

@hideifpathexists:!C:\Program Files\MPC-HC cd "C:\Program Files\MPC-HC" @async:"C:\Program Files\MPC-HC\mpc-hc64.exe" {filepath}
All that's needed is a @hideifpathexists modifier, or perhaps @hideifpathnotfound would make more sense. :bulb:

Regards, AB

You could use @hideif and a startup script that set or cleared global variables depending on whether the path was present or not?

Yes, that would be an approach but it would require maintaining a list of all "paths of interest" per PC. I use the same custom application launch menu on a laptop and a desktop and sometimes on a VM. They have different sets of applications installed. Ideally I would like to optimise the list of application launch buttons per system whilst maintaining a single toolbar menu.

Regards, AB

All you'd have to do is sync the startup script as well as the toolbar?

Do you mean scan the application launch toolbar XML for cd "C:\Program Files\etc" strings and extract the relevant paths?

Regards, AB

If you want everything in one place, so you only have to edit the buttons not the buttons + scripts to add each new program, then the easiest thing is probably to have a script that sets a variable based on which machine you are on, then make the buttons simply test that variable.

So the buttons would not look for which programs are installed, but which machine they are on, and you then just edit them if you want them to be shown/hidden on one machine or the other.