I would like to create a toolbar button that will run a specified program only if I have selected a filename with an extension of .TXT in the source lister. I know there has to be a way and I've been through a lot of posts and documentation but can't seem to find what I want.
You could do it using a script in Opus 11, or with a simple command and the new @ codes in Opus 12:
Both @hidenosel and @disablenosel can now check for specific file types being selected; for example, @disablenosel:type=.jpg would disable the button unless at least one .jpg file was selected. Standard pattern matching is supported. You can also test for files (e.g. @hidenosel:files) or folders (e.g. @hidenosel:dirs,type=_tmp).