AIMP Forum

AIMP for PC => Вопросы / Questions => Topic started by: dec on June 12, 2023, 17:22:31

Title: Brackets & Such in formulae
Post by: dec on June 12, 2023, 17:22:31

both '(' and '[' brackets seem highlt problematic ie very buggy when used in Convert or Actions

some really really illogical and inconsistent behaviour/results

i just gave up trying to fine-tune  it - i will just externally massage results later

%_filename%  ($if2(%album%,%album%) $if(%track%,Track $num(%track%,2),)) ($if2(%_date%,$right(%_date%,4))) ($if2(%_bitrate%,(%_bitrate%)) kbits) ($if2(%_length%, (%_length% min)))$if2(%_acoustid_id%, %_acoustid_id%)

just all sorts of buggy behaviour trying to insert text brackets of any sort WITHIN the formula

the other problem is that the doco does not consistently or logically list which 'placeholders' use underscores (as well as %!)

rhe doco is just pretty pathetically limited and lacks details

just a mess
Title: Re: Brackets & Such in formulae
Post by: Artem on June 12, 2023, 19:57:22
Use the %Char macro to define reserved characters
Title: Re: Brackets & Such in formulae
Post by: dec on June 12, 2023, 22:15:52
hi.

so where is a list of 'reserved characters'?

and surely it cannot include every type of bracket?

and it still would make sense as in practice it sort of HALF works ie i get ONE bracket, but not a pair

i get brackets that work outside the $if, but not inside (which is pretty useless, although i can fix afterwards with a different app)
Title: Re: Brackets & Such in formulae
Post by: Artem on June 13, 2023, 00:06:16
so where is a list of 'reserved characters'?

%,() are reserved characters

i get brackets that work outside the $if, but not inside (which is pretty useless, although i can fix afterwards with a different app)

Sure, because () defines arguments for a function.
P.S. $if is not our macro definition
Title: Re: Brackets & Such in formulae
Post by: dec on June 13, 2023, 05:16:24

1. ... and that is documrented where?

2.  square brackets [] seem to be a problem too

3. there is all sorts of inconsistent behaviour; but i would have to capture examples next time

Title: Re: Brackets & Such in formulae
Post by: Artem on June 13, 2023, 08:02:18
and that is documrented where?

No, because its so trivial

square brackets [] seem to be a problem too

Provide an example
Title: Re: Brackets & Such in formulae
Post by: dec on June 13, 2023, 10:55:40
characters, that would often be used in text strings and text formatting, that cannot be used (without error) "trivial", huh?

really?
Title: Re: Brackets & Such in formulae
Post by: dec on June 13, 2023, 10:57:32

... will try to replicate what happened when i trying to create file name with content & format i wanted
Title: Re: Brackets & Such in formulae
Post by: Artem on June 13, 2023, 11:35:00
really?

Yes if you using conditions macro, is not it? Do you see what characters are used to define macro in legend? Didn't that lead to the idea that key characters might be reserved?
Title: Re: Brackets & Such in formulae
Post by: Artem on June 13, 2023, 11:38:12
... will try to replicate what happened when i trying to create file name with content & format i wanted

What format you wanted? Expression that you list in first post written using someone else's (not our) macro language, so what why it does not work in AIMP
Title: Re: Brackets & Such in formulae
Post by: dec on June 13, 2023, 11:53:02
i think you are partially right.

maybe i mixing up AIMP probs with MP3Tag probs

i will have to go back and check which is which

:-(