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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Build M3904 digital phone Script 1

Status
Not open for further replies.

wog424d

Vendor
Aug 29, 2003
20
0
0
HK
Dear everyone,
i have 500 sets of M3904 digial phone to be add into system of Option-11c , All phone class and key assignment are same, everybady who can tell me how to bulid the procomm script to make input easily?
Thank you very much.

Steven
 
I'm not familiar with the hardware you are you using, but probably the easiest way is to use Procomm's script recorder to copy you making the change for one phone, then modify that script to read from a text file or Excel spreadsheet, loop through all data in that file, and configure each phone sequentially.


 
hi,Knob,
can you get me sample, thank's!

Steven
 
I have some sample scripts on my site that show how to read either from a text file or a spreadsheet. Here is more information on how to use the script recorder to get the basic script to start from:

If you are trying to create a script that automates communications with a remote system and the text is relatively constant, you can make the task easier by using the Script Recorder to create your script. To enable the Script Recorder, select the Tools | Scripts | Start Recorder menu item. Procomm Plus will now monitor all incoming data and your outgoing responses to that data. Start performing the tasks (keyboard-based only!) that you want Procomm Plus to record. Once done, select the Tools | Scripts | Stop Recorder menu item. You will be prompted to save your recorded script; some editing of the script may be necessary. Be aware that if you dialed an entry from the Connection Directory, then your recorded script will be attached to that entry unless you change the value at the bottom of the Save As dialog. When you view your script, you will see that it is composed of waitfor/transmit commands. If all looks well, compile your script and see if it executes as expected. To make a recorded script more extensible, you can take a recorded script and replace some of the recorded strings with variables so that a more general script can be created.

 
have you used scripts using a tab delimited as a input list? if so i have a script that added my 200 plus 3904's in just under an hour.. i did a copy then a chg getting the change data and the copy data from two txt files

john poole
bellsouth business
columbia,sc
 
hi johnpoole,
i need the sample script , can you share to me? thank you very much.

mancy
 
yes, i seldom check this forum, i live over in the meridian forum. i will do my best, to post that tomorrow..sorry

john poole
bellsouth business
columbia,sc
 
try this one, it works but may require some fine tunning on your rls

Code:
proc main

   string sline, tn,key0,cpnd,key1,key2

   fopen 0 "3904.txt" READ               ;Open our data file
   while not feof 0                       ;While the file still has data
      fgets 0 sLine                       ;Read a line of data
      strtok tn sLine "`t" 1          ;Get the first field
      strtok key0 sLine "`t" 1          ;Get the second field
      strtok cpnd sLine "`t" 1          ;Get the third field
      strtok key1 sLine "`t" 1          ;Get the fourth field
      strtok key2 sLine "`t" 1          ;Get the fifth field
     ; strtok sTemp3 sLine "`t" 1          ;Get the sixth field
  
  set txpace 30
  waitfor "req:"
   transmit "new^M"
  waitfor "type"
   transmit "3904^M" 
  waitfor "tn  "
   transmit tn
   transmit "^M"
  waitfor "des"
   transmit "xxxx^M"
  waitfor "CUST"
   transmit "0^M"
  waitfor "KBA"
   transmit "^M"
  waitfor "dba"
   transmit "^M"
 waitfor "fdn"
   transmit "xxxxx^M"
 waitfor "tgar"
   transmit "^M"
 waitfor "ldn"
   transmit "^M"
 waitfor "ncos"
   transmit "5^M"
 waitfor "rnpg"
   transmit "^M"
 waitfor "ssu"
   transmit "^M"
 waitfor "xlst"
   transmit "^M"
 waitfor "sgrp"
   transmit "^M"
 waitfor "cls"
   transmit "LNA FNA HTA HFA MWA CNDA DNDA CFXA FTTU AHA^M"
 waitfor "rco"
   transmit "^M"
 waitfor "hunt"
   transmit "xxxxx^M"
 waitfor "lhk"
   transmit "0^M"
 waitfor "lnrs"
   transmit "^M"
 waitfor "sci"
   transmit "^M"
 waitfor "plev"
   transmit "^M"
 waitfor "ast"
   transmit "^M"
 waitfor "iapg"
   transmit "^M"
 waitfor "mlwu_lang"
   transmit "^M"
 waitfor "mlng"
   transmit "^M"
 waitfor "dndr"
   transmit "^M"
 waitfor "key  "
   transmit key0
   transmit "^M"
 waitfor "marp"
   transmit "^M"
 waitfor "cpnd"
   transmit "new^M"
 waitfor "name  "
   transmit cpnd
   transmit "^M"
 waitfor "vmb"
   transmit "^M"
 waitfor "key  "
   transmit key1
   transmit "^M"
 waitfor "marp"
   transmit "^M"
 waitfor "cpnd"
   transmit "^M"
 waitfor "vmb"
   transmit "^M"
 waitfor "key  "
   transmit key2
   transmit "^M"
 waitfor "marp"
   transmit "^M"
 waitfor "cpnd"
   transmit "^M"
 waitfor "vmb"
   transmit "^M"
 waitfor "key"
   transmit "3 adl^M"
 waitfor "key"
   transmit "4 adl^M"
 waitfor "key"
   transmit "5 adl^M"
 waitfor "key"
   transmit "6 csd^M"
 waitfor "key"
   transmit "7 adl^M"
 waitfor "key"
   transmit "8 adl^M"
 waitfor "key"
   transmit "9 adl^M"
 waitfor "key"
   transmit "10 adl^M"
 waitfor "key"
   transmit "11 adl^M"
 waitfor "key"
   transmit "16 mwk xxxxx^M"
 waitfor "key"
   transmit "24 nul^M"
 waitfor "key"
   transmit "25 nul^M"
 waitfor "key"
   transmit "26 nul^M"
   
  
   endwhile
   
   fclose 0

   
endproc

you'll need the 3904.txt as a tab delimited in the same folder, i complie my data in excel then save as a tab delimited, copy and paste that into the aspect editor. that kills excel's formatting help.. with a drap and drop i was getting extra line feeds...

john poole
bellsouth business
columbia,sc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top