Regarding new Bit-Depth Information field

Ah, sorry wasn't following. Are you using this for making custom tags?
I thought you were only trying to display the audio info from the files in the main window of Mp3tag.

The "extra" square bracket ] came from copying your string in your DD.20151230.2057.CET post.

Removing that bracket solved the problem. Last question:

How should the appropriate portion of the script be modified to read like this: W=24 bits

The main purpose was to add the FORMAT tag to the music file, so that it is there for search or file management purposes by ordinary people. The same string can be used as a 'format value' action item.

Seems to be working fine now, though I still wish to add ' bits' to the bit depth (word length) portion of the FORMAT tag, e.g. W=16 bits

Format <== ['A='$regexp(%_codec%,'[\U\D]',)]['; F='$cutRight(%_samplerate%,3)$trimRight('.'$right(%_samplerate%,3),'.0')' kHz']['; W='%_bitspersample%' bits']['; M='%_mode%]

Well, with a humorous smile in my eyes, I have to say again, Mp3tag scripting is a rather hard nut, ...
seems to be much harder than to earn a Bachelor's degree in Physics or a Master's degree in Electronics Engineering. :wink:

Dennis, you are always welcome, happy new year!

DD.20151231.0942.CET

Well, as nuts go, this one is indeed rather hard for me to crack. I took my degrees many years ago and never delved into much in the way of writing code or scripting...as you can tell. I find myself confused when trying to understand your script when you write it out the way you do. What do the red brackets mean? Am I supposed to copy and paste the entire string including them? The last time I did that, I ended up with the scripting error due to an extra bracket.

By the way, happy new year to you too....and thanks for your patience.

Dennis...

See Mp3tag help manual, "Characters with special functionality"
[...] The contents of brackets are displayed only if at least one of the placeholders used inside the brackets has been found.
A square bracket expression works the same like a lengthy $if-clause.

DD.20151231.1124.CET

Thanks for all of your help!!!