Quickly find shell property names

This is only useful to people writing other scripts, not by itself.

This is a simple script button which helps you find shell property names, for when you wish to import one of File Explorer's columns into Opus.

For an example script add-in which uses the column names, see Video length, dimensions, framerate, definition columns and more can be found via the shell-col tag.

You can get the column names using the ad-hoc script editor in Opus, but it's a pain to have to keep re-writing the same script code every time you want to look up another property. This button can be put into a menu somewhere for when you need it. Then you just click, type what you're looking for, and it will open the script output window with a list of matches.

Example:


Download:

Script code for reference:

This is the same as what's in the .dcf button, above:

function OnClick(clickData)
{
	var cmd = clickData.func.command
	cmd.deselect = false;
	var searchString = clickData.func.dlg.GetString("Enter property name to search for:");
	if (searchString == undefined)
	{
		return;
	}
	searchString = "*" + searchString + "*";
	cmd.RunCommand("Set UTILITY=OtherLog,On");
	var props = DOpus.FSUtil.GetShellPropertyList(searchString)
	DOpus.Output("--- " + props.count + " column" + (props.count == 1 ? "" : "s") + " matching " + searchString + " ---");
	for (var e = new Enumerator(props); !e.atEnd(); e.moveNext())
	{
		var prop = e.item();
		DOpus.Output("  " + prop.raw_name + " = " + prop.display_name);
	}
}
6 Likes

Got bored again and made this simple command of @leo's overly complex for no apparent reason. :slight_smile:

This button will do exactly exactly the same as the original script but it will use a dialog to output the results and allow you to copy selected results to the clipboard.

Download:

Notes:

  • You can dbl click an entry in the list to quickly copy a shell property name to the clipboard. The information will also be displayed in the Script Log.

6 Likes

This is really helpful