Run a TOOL Command, based on selection, in a SINGLE WINDOW

Yes, sir, I did, and it worked. Thanks, again, I really appreciate the assistance.

1 Like

Sorry for bothering you, but would you mind helping me out with this VBS script. I successfully created, from your 3-line code template, a 3-line code, which I titled "SUCCESSFUL...mte," but I am unable to apply this same process on the VBS script in the file titled "UNSUCCESSFUL...mte." Moreover, in the VBS script, under the CommandArguments, line 35, I deleted the text in inside the quotation marks since it's inapplicable regarding the command entry that I wanted to implement.

SUCCESSFUL_3 line export script_MKVPropEdit FREE-FORM (BAT file executed).mte (164 Bytes)
UNSUCCESSFUL_VBS script_MKVPropEdit_ FREE FORM.mte (1.8 KB)

What do you expect the scripts to do?
What is the contents of %mp3propedit_freeform%?
How is the script unsuccessful?

You must be more specific when asking for help! :slightly_smiling_face:

But for starters, you forgot the single quotes when you changed "%creation_time%" to "%mp3propedit_freeform%" in Line 28

SelectedFilesDictionary.Add "'%_path%'", "%mp3propedit_freeform%"'
Should be:
SelectedFilesDictionary.Add "'%_path%'", "'%mp3propedit_freeform%'"'

%mp3propedit_freeform% should contain the complete command line arguments, except for the file path. Hopefully, that is true.

My apologies for being vague. Usually, I am very detailed, but I guess I am doing a poor job. Nonetheless, thanks for responding. As for what I am trying to accomplish, from the first image attached, titled "Free-form objective.png," which works using the 3-line code you prescribed, it's a failure when I attempt to perform that same task using VBS-script. Moreover, as for the second image, titled "Line 28 Error.png," the error appears after your recommendation of returning line 28 to match the same format as the first VBS script that you sent me regarding the creation time. SelectedFilesDictionary.Add

"'%_path%'", "'%mp3propedit_freeform%'"'


Basically, what I am trying to achieve, that has already been achieved via your 3-line code, is that I can implement a command line such as --edit track:a1 --set flag-default=1 --edit track:s1 --set flag-default=1 --set flag-forced=0 --set name="English: Signs/Lyrics" --set language=eng --edit track:s2 --set flag-default=0 --set flag-forced=0 --set name="Full Translation" --set language=eng, in the %mp3propedit_freeform% field, and mkvpropedit.exe will actually run and fulfill the command. This works using your 3-line code, which I am very grateful for, but it's unsuccessful when I attempt it using VBS-script. I believe the problem likely comes from Line 35 because from the first VBS script you sent to me, Line 35's CommandArguments = "--edit info --set date=". However, it's not applicable for this command line because I am not trying to change the date. I hope I am being as detailed as possible lol. And thanks again for responding.

Don't worry about it. It is sometimes difficult to ask succinct questions with all the necessary information. :wink:
Your new command line contains double quotes and I suspect they are not handled properly by my script.
I will do some investigation and testing to figure out a solution, then reply again.

thank you, sir. I appreciate it

Double quotes were the issue.
I have enough trouble with them in VBS scripts alone, never mind trying to write a VBS script with the Mp3tag MTE script language. :slightly_smiling_face:
If the attached script fails, I may need a copy of one of your MKV files for further testing.
You can post a link to a file sharing service.

And here's a "heads-up": single quotes have a special function in Mp3tag scripting so they might need special handling to be used literally.

CORRECTED_Jan11_2022_VBS script_MKVPropEdit_ FREE FORM.mte (1.8 KB)

It worked. Thank you so much. I really appreciate it. There is no way that I would have been able to figure it out, given the fact I just glanced at your corrections. All of this could have been avoided if Mkvmerge.exe had a command line to preserve the original "Encoded date" because when it comes to handling mkv files, mkvtoolnix (mkvmerge.exe, mkvpropedit.exe), in my opinion, surpasses FFmpeg :grinning:. Nonetheless, thanks again. I really appreciate the help.

1 Like

One more question, if I wanted to include MKA as a list of extension for the script to read, how do I go about modifying Line 27 in the VBS script you just sent me?

' if LCase("'%_extension%'") = "mkv" then'

Never mind, I figured it out below:

' if LCase("'%_extension%'") = "mkv" OR ("'%_extension%'") = "mka" then'

1 Like

Good. :+1:
But the comparisons are case sensitive, so you might want to use the "Lower Case function", like this:
' if LCase("'%_extension%'") = "mkv" OR LCase("'%_extension%'") = "mka" then'

Thank you, sir. Hope you don't mind me, in the future, asking you for assistance because it was pure luck that I managed to insert multiple extensions :grinning:. Thanks, again

Sure, I'm happy to help.
For issues that do not concern Mp3tag, we should use the "Off-Topic" section or maybe the forum's "Message" system.
This thread started OK, but we are now getting into non-Mp3tag areas. :slightly_smiling_face:

Yes sir. Thank you, and I will do that the next time