Columns Viewer

Can you please post the entire code for the column? Because at first glance, it seems an error in there. If I create an Evaluator column with the following code:

if ((IsSet(ext)) || (ext="jpg"))
{if (IsSet(shootingtime))
seconds = DateDiff("s", shootingtime, Now());
s = seconds Mod 60;
m = seconds / 60 Mod 60;
h = seconds / 60 / 60 Mod 24;
d = seconds / 60 / 60 / 24;
ss = (d > 0 || s == 0) ? "" : s + "s";
mm = (m == 0) ? "" : m + "m ";
hh = (h == 0) ? "" : h + "h ";
dd = (d == 0) ? "" : d + "j ";
return Trim(dd + hh + mm + ss);}

it throws me the same error...

Can you please check for the following:

  • Open /dopusdata\ConfigFiles\scriptaddins.oxc and check how many times appears the text OrphanedXMP.osp
  • Does that column is listed anyway?

How a particular script gets its values is entirely up to its creator. I don't use that script, but I think it gets the values for the whole folder, that's the way it's designed. Since this command only (ab)uses the Rename tool to get those values, I guess it would be the same if you tried to rename a file using that column? It's not something related to ColumnsViewer though (not a bug). But that's why ignored_script_columns is for :wink:.

presents for one time each

		<script id="{7E575F77-48D6-46F5-83E7-EAA0F319664D}" path="OrphanedXMP.osp\OrphanedXMP.js" />
		<script id="{8217BEE1-7BC5-4F09-AB78-D3A47C4D6151}" path="Real Header File Type Extension.osp\Real Header File Type Extension.vbs" />

no

don't understand you. what is "the entire code" and for which column?

@fkast your Evaluator column code with the error. Better if you please post the entire xml code for the column (using Share to Clipboard)

aaah! it's an error in my column! )) got it

XML <?xml version="1.0"?>

seconds = DateDiff("s", modified, Now());
s = seconds Mod 60;
m = seconds / 60 Mod 60;
h = seconds / 60 / 60 Mod 24;
d = seconds / 60 / 60 / 24;
ss = (d > 0 || s == 0) ? "" : s + "s";
mm = (m == 0) ? "" : m + "m ";
hh = (h == 0) ? "" : h + "h ";
dd = (d == 0) ? "" : d + "d ";
return Trim(dd + hh + mm + ss);

I can't reproduce this with a test .osp script I have. If you like, you can PM me that script column, so I can take a look at it when I have some free time. Even better if you attach your scriptaddins.oxc too.

@fkast sorry, I'm still unable to reproduce the issue. I don't have any warning when Columns Viewer gets their values in the script log, and they are listed as usual. (That Real Header File Type Extension script fails constantly though, but that's another story)

In your scriptaddins.oxc, I noticed that you changed the extension of some scripts. Maybe you also edited their content (including ColumnsViewer) and that's why it's failing on your side but not on mine?

yes, i want to install then manually in scripts folder and delete .txt extension.
Leo? Can this be an issue?

Opus itself doesn't care but the script or related buttons might.

@fkast regarding Columns Viewer, it doesn't care either, as the command filters and reads the columns that appear in scriptaddins.oxc, scriptcolumns.oxc and scriptprefs.osd.
But you should be aware of a few points regarding that practice and the way the command fetches existing script columns:

  • If you install a script in the regular way, and then modify its extension, 2 entries will be generated for that script, one of them being recognised by the command as a non-existing script.
  • DO does not instantly write to the mentioned config files any changes you make to the names, or if you uninstall or install a script. So the command cannot see those changes either. You can try restarting DO and see if you still get the same error.

After that, the only thing I can think of is that you are not allowed to open the .osp file as a compressed file. That way, the script can't know what's inside the file. Are the only column scripts you have in .osp format?
Can you please do a normal install of this column and see if also gives you an error. (Restart DO after installation prior to test).

Added v1.0.7 with support for drop items and other additions detailed in the main post.

1 Like

Updated the script in the main post, which had an error in the new search, so whoever wants to can download it again. Sorry about that.

2 Likes

Previously, the script tried to use all the shell columns, even those that had been disabled, which gave an error. v1.0.8 fixes that. Also fixes autosize dialog, that was broken with v1.0.7.

2 Likes

not a bug, just an observation:
if I use the Columns Viewer on the second monitor, which I often turn off, the window does not appear on the remaining single monitor, but retains the old position.

v1.0.9 is out. Hopefully fix that and other issues as well.

1 Like

v1.1.0 is up and comes with minor corrections, to get ready for DO 13 release.

1 Like

v1.1.1 is up with the following improvements:

  • The command can now properly discard ghost columns.
  • Improved getting data from non built-in columns, especially when you have a huge amount of them.
  • Added a progress dialog when loading info.
3 Likes

v1.2.0 Beta 1 (2024-02-06)

  • Added obtention_method in Script Configuration to change the way this command obtains values for Script, Evaluator and Shell columns. You can choose between Evaluator and Rename Presets.
  • Improved progress bar.
  • Improved launch when there's no tab/lister (e.g. via dopusrt.exe).

With the inclusion of Evaluator in DO 13, there is now a new way to get values for columns. The latest beta adds an additional option in settings (disabled by default) to test it. Note the following changes:

  • When using Evaluator the fetching should be much faster.
  • No temporary files are generated.
  • Some values are not possible to be retrieved, due to what is discussed here.
  • Empty columns will not be listed (I'm not sure how to differentiate between a non-existent column and a column with no value, any help with this matter is appreciated).

Have fun testing it! :wink:
(Leo can you please move this post to the Scripts/Buttons Category please)

2 Likes

Update v1.2.1 (Feb 17, 2024)

  • Added obtention_method in Script Configuration, to change the way this command obtains values for Script, Evaluator and Shell columns. You can choose between Evaluator and Rename Presets.
  • Improved progress bar.
  • Improved launch when there's no tab/lister (e.g. via dopusrt.exe).
  • Other minor fixes.
2 Likes

v1.2.2 (Feb 22, 2024)
I've posted a small update for this command. It fixes 1 reported issue for which I found a workaround. If you're using the command regularly, it's highly recommended to update to the latest version.

2 Likes

:warning: IMPORTANT: Needs at least v13.5.1
v1.3.0 (Apr 21, 2024) :

  • Now the dialog uses the font name/size configured in Preferences / Colors and Fonts / Fonts > Dialogs.
  • Empty column values are now shown instead of being skipped.
  • Improvements when using with the FILE argument.
  • Code updated/cleaned up.
1 Like