Custom buttons and filters

Hello,

I'm new to Directory opus I've just installed version 8.1.08 however and I have read the tutorial my querry is about filtering files quickly in a lister and I was lead to believe that you need to create custom button I don't appear to have a custom button window as shown in the tutorial has it been removed?

John... you've got three separate topics on the forum asking the same basic thing man, not nice :slight_smile:. I'll reply to this once because the subject is more descriptive than one and it's not necessarily a feature request like the other. There are different ways to go about this sort of thing, here are some basics:

  • Right click on any empty toolbar space and select Customize from the menu. You can also get to the same 'Customize' dialog window by going to Settings->Customize on the menu bar.
  • In the Customize window that appears, click on the Commands tab.
  • On the left side of the Command tab window, under the Category section, select the View category.
  • On the right side of the screen under the Commands section, you'll see several command options relevant to your questions:

Hide Files Field
Hide Folders Field
Show Files Field
Show Folders Field

You can drag any of the commands from the 'Command' part of the Customize dialog to the toolbar. Some create 'buttons' others create drop down 'fields' like those above. For these, you need to type in what you want to show or hide (a wildcard pattern maybe?) and hit key to execute it.

In your feature request post to the forum you asked about a slightly different way of doing this and it is possible. Heres a handy tip expanded upon from something provided by JohnZeman... Create a batch file somewhere in your system search path that runs the following command:[b]start "" "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" *%~x1 HIDEUNSEL[/b]You can then create your own 'custom button' following the same steps above, except that after getting the 'Customize' dialog opened up, once again right click somewhere on a toolbar and go to either the 'New' or 'Insert New' popup menu options and select Button. Once you create a new button, you can right click and 'Edit...' it and in the function field, enter the name of your batch file. Give it a try and let us know... enjoy!

edit note- the command above for the batch file should be on one line.

Thanks for the help. As for the other posts I wasn't sure which one it should go in. One was for a new feature request and seemed separate from the others. The other I posted because I thought it should go there then I realised it was not used as often (not so many posts) as the other which after I posted (in the other)seemed to be the more appropriate place. I actually felt a little guilty at the time.

PS Why isn't a filter button in each lister by default? Surely the most natural place for it wouldn't be on the main toolbar but on the one with the navigation and swap panes buttons?

What's your opinion?

And sorry for the similar posts.

pps I've just tried the batch file idea I put the batch file in the root of drive c. Is that wrong? I click the button and see it run but it makes no change to the appearance of the lister display.

Hi john... no worries. Just wanted to mention about the dupe posts, not 'lecture' or anything :slight_smile:.

When you added the name of the batch file in the 'funtion' field of your new button, did you enter it as "C:\batchname.bat"? I don't believe the root of C: is a default system search path, so you would need to provide the full path to the batch file.

Also, you would need to have at least one file selected in the lister before you pressed the button. The batch file selects all files with the same extension as any files you currently have selected -> 'hides' the rest.

Lastly, are you running an NT based windows OS (NT, 2000, XP, 2003)? I think the batch file will only work on NT based windows maybe...

Thanks for the fast reply.
The text I entered into the function field of the button was "C:\DOpus_button.bat". I did remember to select a file before pressing the button.

I'm running a standard Windows xp sp 2 installation.

The batch file simply has the text mentioned about in the box above all on one line.

Thanks again.

DOH'

My fault, I reread what I posted to you and left out a critical part. The button should actually run the following (given your batch file name):[b]"C:\DOpus_button.bat" {f}[/b]The {f} string is among the 'External Command Control Codes' or 'control sequences' allowed by Dopus to send parameters to external applications (like batch files). The one above is also documented with an alias of {filepath$} - which causes the function it's used with ONLY to be run if a file is selected, and then passes the long filename of the selected file to the application (batch file). Check out the help for more info...

Also, you can click on the 'Advanced' button in the Command Editor window while editing the button so that you can expand on what the button does - i.e. run more than one command. I mention this because you might want to add a runmode hide statement on it's own line before the call to the batch file - this will supress the brief console window that appears when you execute batch files and external programs from a Dopus button. So you'll want in total:[b]runmode hide "C:\DOpus_button.bat" {f}[/b]

DAMN, I don't know where my brain is today... Maybe my wife is pregnant again and I'm having spousal sympathatic loss of intelligence. All I've said in the post above was true and needed, but just as critical as the rest of it is the fact that I gave you an incomplete command to run in the batch file. The batch file content should be:[b]start "" "C:\Program Files\GPSoftware\Directory Opus\dopusrt.exe" /cmd Select *%~x1 HIDEUNSEL[/b]Many apologies for the blunder there john... it SHOULD work fine now combining all info in this post and the one above.

Thanks.
The new script works exactly as I wanted.

This will make a real difference to my file searching.

However I think this functionality should have been built in to the product. It seems a little advanced for a newbie.

Do you think directory opus will still have a place when the new Windows Vista makes an appearance? I understand it will have advanced file handling and filtering built in.

Anyway until then I'm very greatful to D.Opus.

Thanks again for the detailed help.

Well, I can say that I've found GPSoft to be more responsive than most vendors to their users requests for new features... I've said before here on these forums that at least 4 distinct new features that I had been among the people asking for were added between 8.0 and 8.1 - for free! So if you stick around for awhile I'm sure you'll find that there's more to come from GPSoft to keep it a strong contender for our file mgmt. needs for both now and after Vista comes out...

As to whether or not this was 'advanced' or at least not readily available for a newbie user to create on their own. That's what this forum was intended to provide... help to users. Most people that cruise these forums enjoy helping ppl figure out how to do cool and useful things with Dopus, and some spend lots of time compiling huge tutorials to show ppl exactly how to start unleashing Dopus power on their unsuspecting computers LOL. Others even write quick little custom programs to help ppl get things done. Welcome to the party...