How to use plugin add column

Not a professional programmer

A most simple example

1 Like

There's an example in the manual.

Script sometimes is too weak

Has any simple non-scripting (which is slow) example appeared since this question was first asked quite a while ago? Searched around the forum a bit, but could only find viewer/VFS plugins, nothing with columns

Evaluator columns in Opus 13 are simple and faster, assuming the simple Evaluator code can do what you need.

If you want more complex, and still want to avoid scripting, then you'd need to write a shell extension or similar, using the Windows APIs for adding them. But that is a lot more complex.

But is there a single example with DOpus integration that would e.g. set some of these column properties ScriptColumn [Directory Opus Manual] so that DOpus knows how to work with/style the custom values coming from that shell extension?

Like you have some old SDKs Plugins: Opus Plugin SDK updated and now available and there are a few examples of viewer/VFS ones, but there is nothing for columns?

Evaluator doesn't have access to item properties like is_symlink etc Item [Directory Opus Manual]?

Also, if I recall correctly, scripting columns have this multicol feature that allows to do some expensive calculations only once per multiple columns (you still couldn't avoid the per-item cost, but at least you could do whatever you needed only once).
Is this something that would be available for Evaluator (guess, not yet?) or Shell Extension columns (guess, not ever since they aren't part of DOpus?)

And then, let's say, if I wanted to get the file size data that DOpus has received from Everything, would that work with these Shell Extensions thingies or would this work have to be duplicated?

There is no Opus-specific column SDK outside of scripting and evaluator columns. If you want to write one in C++ or whatever, you can use the APIs that are part of Windows for adding columns to File Explorer. None of that is specific to Opus and there's lots of documentation and examples around the web.

But that's exactly the issue, I need something specific to Opus so that I could get data Opus already has and just reformat/manipulate it to my liking without suffering per-item scripting performance overhead.

Also those "around the web" explanations are not encouraging even ignoring Opus integration:

  • Windows Property System only is "tied to the specific file type"
  • Column Handler shell extension is only for XP
  • Cloud Storage Provider Property Definitions requires "you will need a complete file system implementation, supplying data for your files/folders placeholders" :scream_cat:, that's like building a new house to pick a door's paint color

Use an Evaluator column in that case.

Which doesn't have access to the data I need? This is the full list of keywords with metadata Evaluator has access to for columns Keywords for Columns [Directory Opus Manual], right?

It doesn't cover those various symlink/reparse etc. file properties?

(but for some other columns I think I'll be able to translate them to Evaluator, will post a few other issues with it separately)

So I've tried the Evaluator, and with weird behavior like Another weird ternary Evaluator result and general very poor ergonomics of coding it's indeed only suitable for very simple things.

What I don't get is: if you can expose Opus data to this new primitive-but-faster scripting enging and then get a one of the few primitive data types back to use in a predefined column, why can you not expose the same data to some external DLL function and get back the same string or integer and use that in the same predefined column (but instead of the script text the user would insert DLL name and a function inside that DLL)?

You're asking for an API that doesn't currently exist. Things don't exist magically by themselves. They have to be written. So far we have not written such an API.

Note that while Explorer dropped support for column handler shell extensions a while ago, Opus still supports them.

Ok, so I've added this as a separate feature request Add APIs to allow using native DLL functions for custom columns