SCRIPT PROBLEM

this is the part of my script


/ queue simple print;

:set a [/queue simple get 0 name] ;
/ queue simple add name = ($a . "-new");

I have couple queues in queue menu. I want to select first one and to create new one with some other settings.
Problem is when I type this code in console IT WORKS
but when I save my script in SYSTEM---->SCRIPTS and when I run it does not create queue in queue menu.

what I'm doing wrong?

Hi

‘print’ commands won’t run under the scripting environment.

/queue simple print;
(This part won’t run.)
:set a [/queue simple get 0 name] ;
(This will therefore not run either, since Index numbers are not assigned
to the queues. The Print command does this, but won’t work under scripting.)
/ queue simple add name = ($a . “-new”);
(Because the Set Command failed as well, this one won’t work as consequence.)

What you can do, is to search for the Index value by using the entry’s name,
like this:

:set a [/queue simple get [/queue simple find SOMETHING=IT’SVALUE] name]

and continue with your script as you have it there.
The FIND command returns the index number in hexadecimal notation.

I hope that helps.

-K