Problems with "go foldercontent" command

i'm trying to populate a docked floating menu with shortcuts to all my apps. rather than add them individually, as i have done in the past, i thought i'd let DOpus make the menus for me from folders full of shortcuts - that would make it much easier to add/remove items in the future.

using the following code, it works

go foldercontent=button "C:\Program Files\Directory Opus\Menu\Internet"

but not how i want it to. shortcuts in the immediate folder show up with their icons and work fine, but all subfolders turn come up as funky buttons with little arrows on the right side that i have to click in order to expand them. but i want this to operate just like any other menu.

but if i remove =button, then it doesn't work at all. i just get a button that, when clicked, takes me to the folder in a lister.

what am i doing wrong?

hmm ok if i use go foldercotent=menu it works like i want it to.

that's definitely not in the manual :slight_smile:

but still, the toolbar isn't acting like a menu. i have to click each item to open the menu, i can't just run my mouse across the words and have it open each menu successively. can this happen with floating toolbars, or is it one of those silly "limitations"?

What you've done does indeed fix it, but the problem isn't what you think.

In fact, the =menu part is being ignored, since "menu" doesn't mean anything to the FOLDERCONTENT argument, but just having that extra word there is solving the problem...

This would've solved the problem in the same way:

Go FOLDERCONTENT=kittycats "C:\Program Files\Directory Opus\Menu\Internet":slight_smile:

It's down to a subtlety in the way Opus parses command arguments, combined with the Go command's PATH argument being implicit.

When Opus sees this:

Go FOLDERCONTENT "C:\Program Files\Directory Opus\Menu\Internet"

it will be interpreted as this:

Go FOLDERCONTENT="C:\Program Files\Directory Opus\Menu\Internet"

and that doesn't work because the Go command doesn't have a path to work on. The path has been swallowed up by the FOLDERCONTENT argument.

A very simple way to solve the problem is to reorder the arguments so that FOLDERCONTENT doesn't have anything after it to swallow:

Go "C:\Program Files\Directory Opus\Menu\Internet" FOLDERCONTENT

As I mentioned, the Go command's PATH argument is implicit. If there's something on the command line which isn't recognised as being part of another argument then it's assumed to be the path. (That way you can have simple commands like [b]Go C:[/b] without having to bother with [b]Go PATH C:[/b] or [b]Go PATH=C:[/b].)

Another way to fix the original command is to make it explicit that the path was for the PATH argument. Both of these work:

Go FOLDERCONTENT PATH "C:\Program Files\Directory Opus\Menu\Internet"
Go FOLDERCONTENT PATH="C:\Program Files\Directory Opus\Menu\Internet"

The = after PATH is still optional in these two cases. Even without the = sign there is no danger that Opus will interpret the command as Go FOLDERCONTENT=PATH ... or similar because Opus knows that the word "PATH" is an argument name and thus won't let FOLDERCONTENT swallow it.

However, in some rare situations the = is required because you want to specify a string (usually the name of something) that happens to be a valid argument name. For example, say you wanted to make a button which creates a folder called "INLINE". INLINE happens to be a valid argument for the CreateFolder command, so neither of these will do the job:

CreateFolder INLINE
CreateFolder NAME INLINE

You would have to use this instead:

CreateFolder NAME=INLINE

ok, things are making sense now. thanks leo! i'll go ahead and change all my commands to foldercontent=kittycats :slight_smile:

any ideas about why the toolbar isn't acting like a regular menu bar? is that just a limitation of floating toolbars?

The top-level of floating toolbars (i.e. the toolbar itself) doesn't track the mouse when a sub-menu is open so you do have to click on the menus to open them, instead of just hovering over them.

Sub-menus should open just by hovering, though. They do for me at least.

I think there may be a technical reason why menus in floating toolbars behave the way they do but the details escape me.

I was just curious if there was any way to make this work like the flat view with a filter. Example: I have a folder called V:\Virtualization\Virtual Machines. This folder then contains a sub folder for each virtual machine. Each of these sub folders has a *.vmx file in it that is used to launch that VM. I would like to have a dynamic menu with just the .vmx files in it...

Doesn't look like that's possible with the command at the moment.

That is the conclusion I had made after trying it for about 30 minutes...

Thanks Leo!

Brad