How can I create a button to quickly hide any files/folders that have a particular status icon assigned to them?
There is no way to automatically know, which item has a specific status icon & autoselect it, although there surely is a way to achieve that through scripting. At the moment, you can select those items manually, & hide them using SetAttr TOGGLEATTR=h. Also, if the condition, that caused the status icon to show was changing, the hidden item would not automatically revert to the visible state.
Use Preferences / File Operations / Filters to create a filter that matches the status in question, and then use the command Select FILTER HIDESEL to hide files that match the filter (where is the name you gave the filter in Preferences).
Thanks jon.
Can the button be used to toggle a filter on/off?
Not easily; it's an operation rather than a state. But you could probably couple it with a variable to give you a toggle, or just use two buttons (left / right) to hide/show.
Re-loading the current folder will also unhide items hidden in this way, if you don't mind losing the file selections & scroll position, and don't want to have a separate button/hotkey to unhide things. e.g. Just push F5 and they come back.
(On the other hand, if you do want to keep selections and scroll position then an explicit 'unhide' command will do that.)
Thanks for the tips, I'll work something out.
Status icons are the best new feature in 12. I'm so glad you guys decided to implement it. I use it all the time. Thank you!