Ok, time to give back. I'll start you off with three scripts I use regularly when building systems...
BARS_NPA
**********************************************************
proc main
;**********************************************
;* *
;* BARS_NPA Programmer *
;* *
;* v1.0 By Steven McMillen, TSR *
;* *
;* This program will pull NPA info from *
;* an excel spreadsheet to program NPA *
;* RLI information for a Meridian PBX. *
;* *
;* Excel file can be called anything but *
;* worksheet needs to be named 'NPA'. *
;* and must be open during script running *
;* Column A - NPA numbers 1201 - 1999 *
;* Restricted numbers should not *
;* be included. *
;* Column B - RLI number *
;* *
;* Log into PBX and run from "carrot prompt" *
;**********************************************
string npa,rli,sRowCol
integer col1,col2,row
long DDEChan
row = 2
col1 = 1
col2 = 2
thetop:
Transmit "LD 90^m"
Waitfor "REQ"
Transmit "NEW^m"
Waitfor "CUST"
Transmit "0^m"
Waitfor "FEAT"
Transmit "NET^m"
Waitfor "TRAN"
Transmit "AC1^m"
Waitfor "TYPE"
Transmit "NPA^m"
Waitfor "NPA"
excelrip:
ddeinit DDEChan "excel" "NPA" ;Creates link with Excel Spreadsheet
if FAILURE ;Error if cannot link
usermsg "`a Unable to establish link `rwith Excel Spreadsheet"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col1 ;Pulling data in column A
dderequest DDEChan sRowCol npa ;Assinging value to variable npa
if stricmp npa "end`r`n" ;Testing if end of data
Transmit "^m"
Waitfor "REQ"
Transmit "****^m"
usermsg "The end is here!`rThere is no more Data to input"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col2 ;Pulling data in column B
dderequest DDEChan sRowCol rli
strreplace npa "`n" "" ;Pulling line feed from string value
strreplace rli "`n" "" ;Pulling line feed from string value
row = row + 1 ;Increment row value
meridian:
Transmit npa
Waitfor "RLI"
Transmit rli
Waitfor "SDRR"
Transmit "^m"
Waitfor "ITEI"
Transmit "^m"
Waitfor "NPA"
goto excelrip
theend:
endproc
******************************************************
Set up an excel document MAKE SURE THE WORKSHEET IS NAMED 'NPA'. Have two colums, Column A is for your NPA's, Column B is for your RLI. Be sure to have a column header as the script will start pulling from the 2nd row first. See example of Excel..
NPA RLI
1200 2
1201 2
1202 3
1203 2
Make a template with your standard setup and remove all your Caribean codes or blocked number, modify to suit the customer. Easy using features in excel to make the sheet quickly and once it's done, it's done. When the script is ran it will start from the carrot prompt after login, it will enter ld 90 and program all NPA's on the excel sheet (keep sheet open during build). Sit back and watch.
BARS_NXX
*******************************************************
proc main
;**********************************************
;* *
;* BARS_NXX Programmer *
;* *
;* v1.0 By Steven McMillen, TSR *
;* *
;* This program will pull NXX info from *
;* an excel spreadsheet to program NXX *
;* RLI information for a Meridian PBX. *
;* *
;* Excel file can be called anything but *
;* worksheet needs to be named 'NXX'. *
;* and must be open during script running *
;* Column A - NXX numbers 201 - 999 *
;* Column B - RLI number *
;* *
;* Log into PBX and run from "carrot prompt" *
;**********************************************
string nxx,rli,sRowCol
integer col1,col2,row
long DDEChan
row = 2
col1 = 1
col2 = 2
thetop:
Transmit "LD 90^m"
Waitfor "REQ"
Transmit "NEW^m"
Waitfor "CUST"
Transmit "0^m"
Waitfor "FEAT"
Transmit "NET^m"
Waitfor "TRAN"
Transmit "AC1^m"
Waitfor "TYPE"
Transmit "NXX^m"
Waitfor "NXX"
excelrip:
ddeinit DDEChan "excel" "NXX" ;Creates link with Excel Spreadsheet
if FAILURE ;Error if cannot link
usermsg "`a Unable to establish link `rwith Excel Spreadsheet"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col1 ;Pulling data in column A
dderequest DDEChan sRowCol nxx ;Assinging value to variable dn
if stricmp nxx "end`r`n" ;Testing if end of data
Transmit "^m"
Waitfor "REQ"
Transmit "****^m"
usermsg "The end is here!`rThere is no more Data to input"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col2 ;Pulling data in column B
dderequest DDEChan sRowCol rli
strreplace nxx "`n" "" ;Removing line feed from string
strreplace nxx "`r" ""
strreplace rli "`n" "" ;Removing line feed from string
strreplace rli "`r" ""
row = row + 1 ;Incrementing row counter
meridian:
Transmit nxx
mspause 50
transmit "^m"
Waitfor "RLI"
Transmit rli
mspause 50
transmit "^m"
Waitfor "SDRR"
mspause 50
Transmit "^m"
Waitfor "ITEI"
mspause 50
Transmit "^m"
Waitfor "NXX"
goto excelrip
theend:
endproc
******************************************************
Set up an excel document MAKE SURE THE WORKSHEET IS NAMED 'NXX'. Have two colums, Column A is for your NXX's, Column B is for your RLI. Be sure to have a column header as the script will start pulling from the 2nd row first. See example of Excel..
NXX RLI
200 2
201 2
202 3
203 2
Make a template with your standard setup, modify to suit the customer. Easy using features in excel to make the sheet quickly and once it's done, it's done. When the script is ran it will start from the carrot prompt after login, it will enter ld 90 and program all NPA's on the excel sheet (keep sheet open during build). Sit back and watch.
MULTICHANGE
*****************************************************
proc main
;**********************************************
;* *
;* Multi-Change Programmer *
;* *
;* v1.0 By Steven McMillen, TSR *
;* *
;* This program will perform set changes *
;* based on information entered on an *
;* excel spread sheet. Thus providing *
;* the benefit of cut and paste. *
;* *
;* At this point script will only make *
;* one change per set, if multiple changes *
;* needed enter extra row entries. *
;* *
;* Excel file can be called anything but *
;* worksheet needs to be named 'Change'. *
;* and must be open during script running *
;* Column A - Set type *
;* Column B - Set TN *
;* Column C - Change value(enter as if *
;* you where to key it manually *
;* *
;* Log into PBX and run from "carrot prompt" *
;**********************************************
string typ,tn,chg,sRowCol
integer col1,col2,col3,row
long DDEChan
row = 2
col1 = 1
col2 = 2
col3 = 3
thetop:
Transmit "LD 20^m"
Waitfor "REQ"
excelrip:
Transmit "CHG^m"
Waitfor "TYPE"
ddeinit DDEChan "excel" "CHG"
if FAILURE
usermsg "`a Unable to establish link `rwith Excel Spreadsheet"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col1
dderequest DDEChan sRowCol typ
if stricmp typ "end`r`n"
Transmit "****^m"
usermsg "The end is here!`rThere is no more Data to input"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col2
dderequest DDEChan sRowCol tn
strfmt sRowCol "R%dC%d" Row Col3
dderequest DDEChan sRowCol chg
strreplace typ "`n" ""
strreplace tn "`n" ""
strreplace chg "`n" ""
strreplace tn "-" " "
row = row + 1
meridian:
Transmit typ
Waitfor "TN"
Transmit tn
Waitfor "ECHG"
Transmit "YES^m"
Waitfor "ITEM"
mspause 250
Transmit chg
When Target 0 "MARP ON" call Marpreact
if strfind chg "FDN"
goto StepA
endif
if strfind chg "SCR"
call NameChange
endif
if strfind chg "SCN"
call NameChange
endif
if strfind chg "MCR"
call NameChange
endif
if strfind chg "DN"
call NameChange
endif
when target 0 "FTR" call handle
mspause 250
Transmit "^m"
;usermsg "here"
StepA:
mspause 250
Transmit "^m"
;Waitfor "ITEM"
Transmit "^m"
Waitfor "REQ"
goto excelrip
theend:
endproc
proc handle
mspause 250
Transmit "^m"
endproc
proc NameChange
Transmit "^m"
Waitfor "CPND"
Transmit "^m"
Waitfor "VMB"
Transmit "^m"
endproc
proc marpreact
Transmit "^m"
endproc
*******************************************************
Ok, this one is a favorite in my office. Ever program a system and then realize you forgot to program CLS HTA and HUNT 7000 or something on all 500 of your phones, well MultiChange to the rescue. Have an excel sheet template, have THE WORKSHEET NAMED 'CHANGE'. Have three columns, A is 'Type', B is 'TN', and C is 'Change'. Enter the change as you would key it, see example below...
TYPE TN CHANGE
500 23-0-4-3 CLS PUA
500 23-0-4-4 CLS PUA
2008 23-0-5-1 CLS HTA
2008 23-0-5-1 HUNT 7000
3904 23-0-5-3 CLS MWA
3904 23-0-5-3 KEY 16 MWK 7000
etc. etc.
Again with the whole copy paste thing going in excel this can really help you out especially if you have documentation already that has some of this info (type,tn) in excel format, just copy and past it into the template, type your change out once, then copy that through to the other sets. Sit back and enjoy, I've used this program to make thousands of changes!!
If you have questions please email me at
steven.mcmillen 'at' morefield.com
I got more goodies but not quite ready to go public with some of them.
BARS_NPA
**********************************************************
proc main
;**********************************************
;* *
;* BARS_NPA Programmer *
;* *
;* v1.0 By Steven McMillen, TSR *
;* *
;* This program will pull NPA info from *
;* an excel spreadsheet to program NPA *
;* RLI information for a Meridian PBX. *
;* *
;* Excel file can be called anything but *
;* worksheet needs to be named 'NPA'. *
;* and must be open during script running *
;* Column A - NPA numbers 1201 - 1999 *
;* Restricted numbers should not *
;* be included. *
;* Column B - RLI number *
;* *
;* Log into PBX and run from "carrot prompt" *
;**********************************************
string npa,rli,sRowCol
integer col1,col2,row
long DDEChan
row = 2
col1 = 1
col2 = 2
thetop:
Transmit "LD 90^m"
Waitfor "REQ"
Transmit "NEW^m"
Waitfor "CUST"
Transmit "0^m"
Waitfor "FEAT"
Transmit "NET^m"
Waitfor "TRAN"
Transmit "AC1^m"
Waitfor "TYPE"
Transmit "NPA^m"
Waitfor "NPA"
excelrip:
ddeinit DDEChan "excel" "NPA" ;Creates link with Excel Spreadsheet
if FAILURE ;Error if cannot link
usermsg "`a Unable to establish link `rwith Excel Spreadsheet"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col1 ;Pulling data in column A
dderequest DDEChan sRowCol npa ;Assinging value to variable npa
if stricmp npa "end`r`n" ;Testing if end of data
Transmit "^m"
Waitfor "REQ"
Transmit "****^m"
usermsg "The end is here!`rThere is no more Data to input"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col2 ;Pulling data in column B
dderequest DDEChan sRowCol rli
strreplace npa "`n" "" ;Pulling line feed from string value
strreplace rli "`n" "" ;Pulling line feed from string value
row = row + 1 ;Increment row value
meridian:
Transmit npa
Waitfor "RLI"
Transmit rli
Waitfor "SDRR"
Transmit "^m"
Waitfor "ITEI"
Transmit "^m"
Waitfor "NPA"
goto excelrip
theend:
endproc
******************************************************
Set up an excel document MAKE SURE THE WORKSHEET IS NAMED 'NPA'. Have two colums, Column A is for your NPA's, Column B is for your RLI. Be sure to have a column header as the script will start pulling from the 2nd row first. See example of Excel..
NPA RLI
1200 2
1201 2
1202 3
1203 2
Make a template with your standard setup and remove all your Caribean codes or blocked number, modify to suit the customer. Easy using features in excel to make the sheet quickly and once it's done, it's done. When the script is ran it will start from the carrot prompt after login, it will enter ld 90 and program all NPA's on the excel sheet (keep sheet open during build). Sit back and watch.
BARS_NXX
*******************************************************
proc main
;**********************************************
;* *
;* BARS_NXX Programmer *
;* *
;* v1.0 By Steven McMillen, TSR *
;* *
;* This program will pull NXX info from *
;* an excel spreadsheet to program NXX *
;* RLI information for a Meridian PBX. *
;* *
;* Excel file can be called anything but *
;* worksheet needs to be named 'NXX'. *
;* and must be open during script running *
;* Column A - NXX numbers 201 - 999 *
;* Column B - RLI number *
;* *
;* Log into PBX and run from "carrot prompt" *
;**********************************************
string nxx,rli,sRowCol
integer col1,col2,row
long DDEChan
row = 2
col1 = 1
col2 = 2
thetop:
Transmit "LD 90^m"
Waitfor "REQ"
Transmit "NEW^m"
Waitfor "CUST"
Transmit "0^m"
Waitfor "FEAT"
Transmit "NET^m"
Waitfor "TRAN"
Transmit "AC1^m"
Waitfor "TYPE"
Transmit "NXX^m"
Waitfor "NXX"
excelrip:
ddeinit DDEChan "excel" "NXX" ;Creates link with Excel Spreadsheet
if FAILURE ;Error if cannot link
usermsg "`a Unable to establish link `rwith Excel Spreadsheet"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col1 ;Pulling data in column A
dderequest DDEChan sRowCol nxx ;Assinging value to variable dn
if stricmp nxx "end`r`n" ;Testing if end of data
Transmit "^m"
Waitfor "REQ"
Transmit "****^m"
usermsg "The end is here!`rThere is no more Data to input"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col2 ;Pulling data in column B
dderequest DDEChan sRowCol rli
strreplace nxx "`n" "" ;Removing line feed from string
strreplace nxx "`r" ""
strreplace rli "`n" "" ;Removing line feed from string
strreplace rli "`r" ""
row = row + 1 ;Incrementing row counter
meridian:
Transmit nxx
mspause 50
transmit "^m"
Waitfor "RLI"
Transmit rli
mspause 50
transmit "^m"
Waitfor "SDRR"
mspause 50
Transmit "^m"
Waitfor "ITEI"
mspause 50
Transmit "^m"
Waitfor "NXX"
goto excelrip
theend:
endproc
******************************************************
Set up an excel document MAKE SURE THE WORKSHEET IS NAMED 'NXX'. Have two colums, Column A is for your NXX's, Column B is for your RLI. Be sure to have a column header as the script will start pulling from the 2nd row first. See example of Excel..
NXX RLI
200 2
201 2
202 3
203 2
Make a template with your standard setup, modify to suit the customer. Easy using features in excel to make the sheet quickly and once it's done, it's done. When the script is ran it will start from the carrot prompt after login, it will enter ld 90 and program all NPA's on the excel sheet (keep sheet open during build). Sit back and watch.
MULTICHANGE
*****************************************************
proc main
;**********************************************
;* *
;* Multi-Change Programmer *
;* *
;* v1.0 By Steven McMillen, TSR *
;* *
;* This program will perform set changes *
;* based on information entered on an *
;* excel spread sheet. Thus providing *
;* the benefit of cut and paste. *
;* *
;* At this point script will only make *
;* one change per set, if multiple changes *
;* needed enter extra row entries. *
;* *
;* Excel file can be called anything but *
;* worksheet needs to be named 'Change'. *
;* and must be open during script running *
;* Column A - Set type *
;* Column B - Set TN *
;* Column C - Change value(enter as if *
;* you where to key it manually *
;* *
;* Log into PBX and run from "carrot prompt" *
;**********************************************
string typ,tn,chg,sRowCol
integer col1,col2,col3,row
long DDEChan
row = 2
col1 = 1
col2 = 2
col3 = 3
thetop:
Transmit "LD 20^m"
Waitfor "REQ"
excelrip:
Transmit "CHG^m"
Waitfor "TYPE"
ddeinit DDEChan "excel" "CHG"
if FAILURE
usermsg "`a Unable to establish link `rwith Excel Spreadsheet"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col1
dderequest DDEChan sRowCol typ
if stricmp typ "end`r`n"
Transmit "****^m"
usermsg "The end is here!`rThere is no more Data to input"
goto theend
endif
strfmt sRowCol "R%dC%d" Row Col2
dderequest DDEChan sRowCol tn
strfmt sRowCol "R%dC%d" Row Col3
dderequest DDEChan sRowCol chg
strreplace typ "`n" ""
strreplace tn "`n" ""
strreplace chg "`n" ""
strreplace tn "-" " "
row = row + 1
meridian:
Transmit typ
Waitfor "TN"
Transmit tn
Waitfor "ECHG"
Transmit "YES^m"
Waitfor "ITEM"
mspause 250
Transmit chg
When Target 0 "MARP ON" call Marpreact
if strfind chg "FDN"
goto StepA
endif
if strfind chg "SCR"
call NameChange
endif
if strfind chg "SCN"
call NameChange
endif
if strfind chg "MCR"
call NameChange
endif
if strfind chg "DN"
call NameChange
endif
when target 0 "FTR" call handle
mspause 250
Transmit "^m"
;usermsg "here"
StepA:
mspause 250
Transmit "^m"
;Waitfor "ITEM"
Transmit "^m"
Waitfor "REQ"
goto excelrip
theend:
endproc
proc handle
mspause 250
Transmit "^m"
endproc
proc NameChange
Transmit "^m"
Waitfor "CPND"
Transmit "^m"
Waitfor "VMB"
Transmit "^m"
endproc
proc marpreact
Transmit "^m"
endproc
*******************************************************
Ok, this one is a favorite in my office. Ever program a system and then realize you forgot to program CLS HTA and HUNT 7000 or something on all 500 of your phones, well MultiChange to the rescue. Have an excel sheet template, have THE WORKSHEET NAMED 'CHANGE'. Have three columns, A is 'Type', B is 'TN', and C is 'Change'. Enter the change as you would key it, see example below...
TYPE TN CHANGE
500 23-0-4-3 CLS PUA
500 23-0-4-4 CLS PUA
2008 23-0-5-1 CLS HTA
2008 23-0-5-1 HUNT 7000
3904 23-0-5-3 CLS MWA
3904 23-0-5-3 KEY 16 MWK 7000
etc. etc.
Again with the whole copy paste thing going in excel this can really help you out especially if you have documentation already that has some of this info (type,tn) in excel format, just copy and past it into the template, type your change out once, then copy that through to the other sets. Sit back and enjoy, I've used this program to make thousands of changes!!
If you have questions please email me at
steven.mcmillen 'at' morefield.com
I got more goodies but not quite ready to go public with some of them.