J
jtweed
Guest
I’m trying to write a script that strips off (…) from title tags and appends the contents (between the brackets) to the comment tag, appending the existing comment (or create a new tag).
Here is the script,
I can see the comment and edit it in Picard (showing the tag as ‘comment’) before the script is run. But when this script runs it always returns with ‘No Comment’
I do not understand why,
when there is a comment, that $if2 still returns ‘No Comment’
Why is %comment% empty when I can clearly see in Picard that a comment has been set???
Sorry, I’m rather new to this…
As an aside… is there any debugger for the tag scripts short of applying it and cancelling picard every iteration?
1 post - 1 participant
Read full topic
Continue reading...
Here is the script,
$set(_ob,$find(%title%,\())
$set(_obx,$add(%_ob%,1))
$set(_cb,$find(%title%,\)))
$set(OriginalComment,$if2(%comment%,No Comment))
$set(OriginalTitle,%title%)
$set(comment,$trim($substr(%title%,%_obx%,%_cb%)$if(%OriginalComment%,\, %OriginalComment%,)))
$if($in(%title%,\(),
$set(title,$trim($substr(%title%,0,%_ob%))),
$trim(%title%))
I can see the comment and edit it in Picard (showing the tag as ‘comment’) before the script is run. But when this script runs it always returns with ‘No Comment’
I do not understand why,
$if2(%comment%,No Comment)
when there is a comment, that $if2 still returns ‘No Comment’
Why is %comment% empty when I can clearly see in Picard that a comment has been set???
Sorry, I’m rather new to this…

As an aside… is there any debugger for the tag scripts short of applying it and cancelling picard every iteration?
1 post - 1 participant
Read full topic
Continue reading...