Toggle Button Highlighting persistence issue

I made myself a couple of buttons yesterday to toggle visibility of hidden files and system files using codes I found on the forums here:

Hide Hidden Files:

Hide System Files:

The hide system files one works as expected, but I've noticed a strange (mostly cosmetic) issues with the hidden folders button. The highlighting of the toggle button can change meaning based on the state of the button the last time DOpus was closed.

My intent is for the default state of hidden files to be shown, and be able to toggle the button on to hide them (so button highlighter=hidden files invisible). However, if the button is toggled on (highlighted) when Opus is completely closed (IE completely closed from the systray) then the highlighting will be reversed the next time Opus is started (IE, highlighting will be on when hidden files are hidden, not shown).

I figure this is probably happening because this button changes an actual opus pref, and the toggle function unintelligently toggles between the "current" setting and the "not current" setting? I don't know if this is easily fixable, but ideally I'd like to have the visual status of the button be consistent all the time. Is there some alternate button code I can use that will properly toggle hidden file visibility but keep consistent button highlighting status? Or if not, is there a way I can make the hidden file setting reset when opus starts (or closes) so that opus will always start with hidden files shown and the button will start with the correct state?

Thanks in advance.

I don't use the 'toggle' in mine:

Label = Hide

Label = Folders

Two buttons that seem to work correctly.


That first one works the way I wanted it to. Thanks

The Set command's FILTERS argument doesn't have anything to do with the filters which control which files are shown, which explains why the button seemed to behave strangely:

(There are also COPYFILTER and DELFILTER arguments to control the copy and delete filters separately.)

Unfortunately, filter is an overloaded word in Opus (i.e. it has several meanings in different contexts). With commands like Set and Go which can do a lot of different things, it's best to always check the manual to make sure the argument you've chosen does what you expect.

The good news, as you've discovered, is that you don't need to add anything to Set HIDEFILTERATTR=h to make it a toggle since it acts as a toggle automatically.

Thanks for the clarification. It makes a bit more sense to me now. I should really sit down with the DOpus manual more than I do, but I'm just too geeky to ever realize I don't know what I'm doing. :smiley:

Anyway, one last question. After reading your post I realized I could hide system folders the same way (set HIDEFILTERATTR s instead of Set HIDESYSTEMFILES=Toggle). Both work, but just a little bit differently. IE the Hidefilter version persists between relaunches of DOpus (which I like) but only applies to the currently selected file display (in dual view). The Hidesystemfiles version seems to be global (it even hides stuff in the file tree, which is cool), but does not persist between Opus launches.

All in all I think I like the filter way better, but is there a way to apply the filter globally (or at least to both file displays) until it is toggled back off? Thanks.

Hidesystemfiles toggles a Preferences option, so it's global, while the other things just toggle a local filter in the lister (which might get saved and applied to the next lister if Opus is set to remember settings from one lister to another).

Hello all,

I believe to have a related (or the same?) issue.

I have been using a button to display (toggle) hidden files in the current lister for a long time like this:

Until now I had always used the command Set HIDEFILTERATTR h. This had the disadvantage that the button showed the hidden files when it was not in the pushed state. Yesterday I changed (then apparently successfully) this to HIDEFILTERATTR s, so that the button displayed the hidden files correctly in its pressed state.

Today, however, the button no longer works. Hidden files in the current Lister are always displayed and can no longer be hidden.

Am I doing something wrong?

That toggles hiding files with the S (system) attribute set. It's a completely separate attribute to the H (hidden) attribute, although a lot of things have both set at once.

The default menus should already have everything you need here, with correct toggling and highlighting:

You can copy the menu items from there to another place or another menu/toolbar if you need to.

(Note that "Show System Files" in the menu there really toggles things with both H and S attributes set at once. This is often called "system files" in Windows and File Explorer, where "System + Hidden" would be more accurate.)

1 Like

Thanks Leo.

For some reason, this still doesn't work for me, not even with the original command from the menu:

Hidden files like this one:

...are only displayed after I select "Show All" from the "Folder" menu :thinking:

You've probably got another filter hiding them, maybe set by your old button or via Folder Formats (which can also hide files based on attributes in particular folders or types of folders).

OK thanks -- I had to execute the old button (Set HIDEFILTERATTR s) one or two more times.

Now the new button works as expected!