Script Functions

Can you confirm that $upper and $caps don't work anymore in export?
And what exactly is $mul("x", y) for?

No, both functions are working fine here. Can you please post or mail your export configuration.

Multiply "x" with "y". Some user wanted to mass-add the SONGLEN field (time in milliseconds), so I've added this function to add this field by using a formatstring like $mul("%_length%", 1000) at Actions, Format value.

Best regards,
~ Florian

They all work in the Exportheader here, but not in the record or footer. No matter how simple the export line is.
But

also makes it fail in the header.
I mailed you a test config.

This is an issue with the parser for the script functions I can't resolve. It took me the whole day to realize that, but I don't see a solution for that :frowning:

Background:

$upper("%_extension%")
This line will expand the %_folderpath% parameter to an absolute folderpath like C:\Music</i> so it becomes
<a href="file:///C:\Music">$upper("%_extension%")
Please note the bold part which will mask/escape the quote. This way, the parser assumes, that >$upper( belongs into the quotes and won't detect the function name.

You can resolve this problem, by adding an additional space after the placeholder:
$upper("%_extension%")

Best regards,
~ Florian

Ok thank you for researching this problem. :slight_smile:

Do the functions (with simple usage) work for you everywhere?

QUOTE (d4n0 @ Jun 13 2004, 11:42 AM)

Do the functions (with simple usage) work for you everywhere?


Yes, they work flawless here after removing the obvious <td ... lines. Please send me your modified export configuration if you still encounter problems.

Best regards,
~ Florian

Sorry I get it now, this line will screw all lines after it and not only its own line.
It's ok now.

$mul("%_length%", 1000) - it seems to always return 0 :grinning:

Because...it really should be: $mul(%_length%, 1000) :man_facepalming:

But still looks odd, 5:59 is definitely not 5000 milliseconds...should be 359456
By the looks of it, truncates everything after first : and simply uses only first number for calculation.

For example 2:19.31 became 2000 ms, which is definitely wrong (it is mixtape, over 2 hours long) ...

The $mul() function multiplies numbers - so you have to supply a number and not a formatted value.
Have a look at the help on more variables:

you probably get better results with %_length_seconds%

Yes, I know...but I was referring to @Florian's answer...

It works fine with %_length_seconds%, catch is that %_length_seconds% is already rounded value and there seems to be no way to retrieve actual milliseconds at the moment.