Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing Terranova scripts

Status
Not open for further replies.

jonschofield

Technical User
Joined
Dec 16, 2002
Messages
13
Location
GB
I'm trying to write a script for Terranova that runs the &quot;list usage extension <insert number here>&quot; command and dumps the output to either a text file or an Excel spreadsheet. I've read another post on this forum relating to Terranova scripts but I can't find much else on the net and I'm new to the system so need a primer.

Any help would be greatly appreciated.
 
Here's a simple one as a start:

SEND &quot;li usa ext 4552 \r&quot;
WAIT 15
SEND &quot;li usa ext 6554 \r&quot;
WAIT 15
SEND &quot;li usa ext 4556 \r&quot;
WAIT 15
SEND &quot;li usa ext 6973 \r&quot;
WAIT 15
SEND &quot;li usa ext 6777 \r&quot;
WAIT 15

Logon to the switch. Goto &quot;File&quot; then &quot;Capture On&quot; and enter the file details. Then execute the script. You can use excel to help layout the script then save it as a text file and rename as a .scr file. -CL
 
Thanks for the help so far. I've managed to get the script to read in an extension number from a file and use that extension in the &quot;list usage extension&quot; command. Can anyone tell me how to loop the script in a range of extensions, say 31000 to 31110?

Thanks.
 
I'm not sure how to automate any importing in Terranova scripting. I used to use Excel. I would setup

column A:
SEND &quot;li usa ext
column B:
31000
column C:
\r&quot;

Then drag the cells to populate 31000-31110. It's a little cludgy but it would work.
-CL
 
I found a way to loop the script so that it reads extension numbers from a txt file. The script will contine to run until there are no more extension numbers in the file. By doing this, the script can be adapted for any range of extensions without having to alter the script.

CAPTURE c:\USAGE

SET ext1 &quot;&quot;
ARGFILE &quot;C:\CAPEXT.TXT&quot;

LABEL 1
GETARG ext1
IF &quot;ext1&quot; == &quot;1&quot; GOTO 2
SEND &quot;list usage extension ext1 \r&quot;
WAITFOR 300 &quot;Extension not assigned&quot; &quot;Command successfully completed&quot; GOTO 1 GOTO 1
LABEL 2
CAPTURE OFF
STOP

Hope this helps anyone who finds themselves in a similar position to myself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top