hw <[email protected]> writes: > Hi, > > how can I conditionally add menu entries? For example: > > > [...] > Read fvwm-functions-starters-common.fvwm > Read fvwm-functions-starters-games.fvwm quiet > Read fvwm-functions-starters-local.fvwm quiet > [...] > > > DestroyMenu Main > AddToMenu Main > + "Main" Title > + "Common" PopUp Common > + "Games" PopUp Games > + "Local" PopUp Local > > > I want the "Common" and "Games" entries in the menu only when the files > defining them (like fvwm-functions-starters-games.fvwm) can be read. > > I thought I could use something like > > DestroyMenu Main > AddToMenu Main > + Test (f fvwm-functions-starters-games.fvwm) AddToMenu Main "Games" PopUp > Games > > > and that doesn't work in that the menu entry doesn't show up regardless > of the existance of the file. There doesn't seem to be a way to test > whether something is defined or not; if there was, I could test if a > menu has been defined and only then add it to another menu.
Try PipeRead. Use shell, Perl, Python, your choice. -- Dan Espen
