Simplify handling special characters in Quick Actions

I always struggle with special characters when using Quick Actions. I know the theory (e.g. Polar Sequences '['with Biosphere']' ), but it takes me a while to get there. Every single time.

So, I would suggest to either:

  1. Get rid of special characters handling in the Quick Actions box. Unless they're needed in some scenarios, but to be honest I've never encountered these. Happy to be contradicted. When would you need special handling of [ or ' in this input field?
  2. Use the more ubiquitous backslash escaping sequence, i.e. [ would be escaped using \[ like in most other softwares.

Again, happy to be explained why the single-quoting escaping sequence is absolutely needed here. If I understand I might stand a better chance remember it!

20210219-205929

The square brackets are some kind of "if" condition where the enclosed contents is only written if at least one referenced field is present. Very useful as it saves you from writing lengthy $if() statements.
An example would be the formatting of a filename where you want to add the extra CD folder only if there is a discnumber: %album%\[CD %discnumber%\]%title%
Which would also show that right there your would have to escape the backslash to be included if the backslash were the escaping character.
The special purpose of the square brackets only appears in format strings. So it is by far not all "Actions (Quick)" but only those that allow a format string.

2 Likes

Understood, thank you for explaining this. I see how it can indeed be quite useful. In your example above I got thrown off by the backslash characters, although I now understand the point you were trying to make. So for folks out there, another example might be a Quick Action to Format Value a field (say COMMENT for testing) with Fred. [%track%. ]%title%

Perhaps the only request to take away from this might be to improve the doc. I see a reference to square brackets under section "Characters with special functionality" in the Help page help.mp3tag.de/main_scripting.html, but it's easy to skip over it. This section could do with a few example to explain the use of each special character to illustrate their use.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.