Sorry for the late response. Thanks for your suggestion, but the problem lies in the third line of the script:
:if ([:find $content “~”] != “”) do={
It does not find the lines starting with the defined character “~”.
We have 3 different simple queue types, and their usage is recorded in the comment lines. There are 2 scripts for each type - one which records usage in the comment field for each type, and another which sends out a usage report for each.
Being unable to distinguish between the tree types, and queues without comments, the above scripts process each queue rule, irrespective of their definition by special character.