GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Unable to export certain user-defined commands

I think this might be a bug…

Going to menu Settings > Customize Toolbars…, Commands tab, User-defined Commands section, I have almost two dozen entries, most of which are fairly simple, which I’m attempting to export to individual OUC files. When I right-click on each command name, a context menu offers me options to edit/duplicate/copy/export/delete. For the majority, when I select Export…, a file save dialog appears, but for two of them, the dialog is completely MIA, and no errors or warnings appear. I am able to copy them, and paste their XML code elsewhere, but export doesn’t work for them. In case they’re useful, the XML of the two commands are as follows:

<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>EXIF/IPTC/XMP_to_JSON</label>
	<tip>Use EXIFTool to export EXIF/IPTC/XMP metadata from all applicable files in SRC to JSON files</tip>
	<user_label>EXIF/IPTC/XMP to JSON</user_label>
	<icon1>#usercommand</icon1>
	<function type="batch">
		<instruction>@runonce </instruction>
		<instruction>@sync </instruction>
		<instruction>exiftool -w %%f.%%e.json -json -struct -G -XMP:All -EXIF:All -IPTC:All .</instruction>
	</function>
</button>
<?xml version="1.0"?>
<button backcol="none" display="icon" textcol="none">
	<label>Set_DATE_TAKEN/DIGITIZED/CREATED</label>
	<tip>Set DATE TAKEN/DIGITIZED/CREATED</tip>
	<user_label>Set DATE TAKEN/DIGITIZED/CREATED</user_label>
	<icon1>#usercommand</icon1>
	<function type="normal">
		<instruction>@set date={dlgstring|Enter a date to use:|}</instruction>
		<instruction>dopusrt /acmd SetAttr FILE {filepath$} META &quot;datetaken:{$date}&quot; &quot;datedigitized:{$date}&quot; &quot;createdate:{$date}&quot;</instruction>
	</function>
</button>
1 Like

Remove the / characters from the command names and it should work.

We'll block those characters in the editor for the name field. That was overlooked until now.

1 Like

Would it be feasible to instead implement some kind of auto-replacement for that character when Export… is invoked, or provide some other way to specify it for use in the name (ASCII code, etc.)?

Slashes in command names could cause other problems, so it's best to just not use them there.

PS: If you just need a backup of the commands, the files are already on disk in /dopusdata/User Commands (or without the space; not at my PC at the moment to check).

1 Like

Figured about as much, but I already got what I needed by pasting the XML for those two commands to text files with proper names.

1 Like