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

Procomm Scripting Question 4

Status
Not open for further replies.

Steviebgood

Technical User
Nov 12, 2004
23
CA
Hi There,

I have to install and program 500 phones and would like to perform this task well in advance through a Procomm script and execute on night of cutover. I am just figuring out Aspect scripting but does anyone have examples on how to setup this script?

I also need to have a script that "outs" phones as well.

Thanks
 
Best way to learn is to build a set and have Script Recorder turned on, this will give you most of what you need. But if you are just starting out with it, I would suggest doing a search for scripts.. There are plenty of examples on the forum.
 
Here is one of my out DN scripts to use from LD 81

; 8th June 2005
; Out_DN81.was Script to remove Analogue & Digital sets (WITH COUNTER)
; from LD 10 (500) / LD 11 (DIGITAL) etc.

; NOTE!
; This program will only work with a WINDOWS version of Procomm Plus.

; All information has to be taken from a source file in LD 81 "FEAT = SETS".
; Capture the data in a "*.TXT" Format such as e.g. "SETS.TXT"

; It's best to save this file in "C:\TEMP" ; ##(Change the path if reqd!)

; Edit the "SETS.TXT" file first as follows.... (Two examples are shown below)

;SETS 00 60031 TN 028 0 07 15 500 M500 2 NOV 2001
;SETS 00 1 18401 TN 044 0 08 00 3905 AGENT 2 NOV 2001

; Change "2500" to "500" for all Analogue sets

; Change "2000" to "2616" for all M2616,M3820,M3110 & M3310 sets
; Change "2000" to "2216" for all M2216 sets
; Change "2000" to "2008" for all M2008 sets
; Change "2000" to "2006" for all M2006 sets

; Change "3900" to "3905" for all M3905 Taurus sets
; Change "3900" to "3904" for all M3904 Taurus sets
; Change "3900" to "3903" for all M3903 Taurus sets
; Change "3900" to "3902" for all M3902 Taurus sets
; Change "3900" to "3901" for all M3901 Taurus sets
; Change "3900" to "3900" for all M3900 Taurus sets

; Change "PCA" to "PCA" for all PCA sets
; Change "ISET" to "I2001" for all I2001 Internet sets
; Change "ISET" to "I2002" for all I2002 Internet sets
; Change "ISET" to "I2004" for all I2004 Internet sets
; Change "ISET" to "I2050" for all I2050 Internet sets

; etc

; Remove any blocks of extn data that you don't require i.e. Mail Sets!.
; If you are working on old Meridian software such as AS V16.xx or V18.xx,
; Then you must split the data FIRST, into Two sections with a space between them.
; (One section is to be for Analogue & another would be for Digital extns)

; Log out of LD 81 & access LD 10 or 11 (Which ever is first on the "SETS.TXT" file).
; Make sure that the first line in the source file contains the start of the
; extn sets data!.

; This program file should remain unaltered & only copies made from it for whatever
; use is required. P.S. I suggest that you make it a "READ ONLY" file. & store it on
; your P.C's "C:\" HARD DRIVE.

; The " ; " denotes that the data on the program file line is ignored,
; when the script is run.

; Click on the BOX marked "COMPILE & RUN" & if successful, Then you will be asked for
; the "SETS.TXT" file. Once you have found & clicked on it, The script will then start
; to run.
; There will be a % counter running on the bottom left hand side showing the
; progress of the script with number of changes left to do





; GENERAL NOTE!

; On all pre "C" Processors e.g V16.xx to 21.xx Meridian systems
; It's best to use the " ~ " symbol (This will insert a short PAUSE!).
; This is somtimes needed to give the Meridian time to process the command
; entered!.

; This is the start of the program script
STRING S_Time
STRING F_Time
STRING readfile
STRING DIRECTORY
INTEGER LEN=0
INTEGER CUT_OFF=0
INTEGER EVENT
LONG COUNT=0
LONG TOTAL=0
LONG PERCENT=0
LONG BIT

STRING OPDATA
STRING OPDATA_A
STRING OPDATA_B

PROC MAIN
STATMSG "Start"
dialogbox 0 236 63 205 200 2 "Out DN's via LD 81"
dirpath 1 2 14 198 11 Directory
dirlistbox 2 2 29 201 140 "D:\Program Files\Symantec\Procomm Plus\Capture\*.*" SINGLE readfile 1 SORT
pushbutton 3 110 173 40 13 "OK" OK DEFAULT
pushbutton 4 55 173 40 13 "Cancel"
text 5 2 1 61 11 "Select READ file" left
enddialog

while 1
dlgevent 0 event
switch event
case 0
endcase

case 1
endcase

case 3
exitwhile
endcase

case 4
exit
endcase

endswitch
endwhile
FOPEN 1 readfile read TEXT ; *****************CHANGE IF NECESSARY

WHILE NOT FEOF 1
FGETS 1 OPDATA
STRLEN OPDATA LEN
IF LEN<3
EXITWHILE
ENDIF

TOTAL=TOTAL+1
ENDWHILE

S_Time=$TIME
call counter

REWIND 1

WHILE NOT fEOF 1
FGETS 1 OPDATA
STRLEN OPDATA LEN
IF LEN<3
EXITWHILE
ENDIF

WHEN TARGET 1 "SCH8783" CALL SCH8825
WHEN TARGET 2 "SCH8825" CALL SCH8825
WHEN TARGET 3 "SCH0128" CALL SCH8825
WHEN TARGET 4 "SCH0099" CALL SCH0099 ; TYPE = 2500
WHEN TARGET 5 "SCH0111" CALL SCH0111 ; TYPE = 2000

SUBSTR OPDATA_A OPDATA 45 5
SUBSTR OPDATA_B OPDATA 32 11

; Make sure that you are in either LD 10 or LD 11 first on older software versions!
; TRANSMIT "LD 10^M"
; WAITFOR "REQ"
TRANSMIT "OUT^M"
WAITFOR "TYPE"
TRANSMIT OPDATA_A
TRANSMIT "^M"
WAITFOR "TN"
TRANSMIT OPDATA_B
TRANSMIT "^M"
WAITFOR "REQ"

count=count+1
CALL COUNTER

ENDWHILE

FCLOSE 1

F_Time=$TIME
usermsg "Removal of Meridian Extn's Complete`n`n at %s" F_TIME
ENDPROC

PROC COUNTER
BIT=COUNT*100
PERCENT=BIT/TOTAL

STATMSG "%i OF %i - %i %% Done - Start Time: %s" COUNT TOTAL PERCENT S_Time
ENDPROC

PROC SCH8825
TRANSMIT "**^M"
ENDPROC

PROC SCH0099
TRANSMIT "500^M"
ENDPROC

PROC SCH0111
TRANSMIT "2616^M"
ENDPROC

###########################################################

Here is the one from LD 83

; 8th June 2005
; Out_DN83.was Script to remove Analogue & Digital sets (WITH COUNTER)
; From LD 10 (500) / LD 11 (DIGITAL) etc.
; For use on Analogue & Digital sets (With counter)
; This will apply from version 16 onwards!
; NOTE!
; This program will only work with a WINDOWS version of Procomm Plus.

; All information has to be taken from a source file in LD 83.

; Capture the data in a "*.TXT" Format such as e.g. "SETS.TXT"

; It's best to save this file in "C:\TEMP" ; ##(Change path if reqd!)

; Edit the "SETS.TXT" file, first as follows.... (Two examples are shown below)

;M3904 2 FEB 2002 00 015 0 00 07 3904 8D 8827
;COMPAN 15 FEB 2000 00 013 0 00 00 500 4D 8814

; Remove any blocks of extn data that you don't require i.e. Mail Sets!.
; If you are working on old Meridian software such as AS V16.xx or V18.xx,
; Then you must split the data FIRST, into Two sections with a space between them.
; (One section is to be for Analogue & another would be for Digital extns)

; Log out of LD 83 & access LD 10 or 11 (Which ever is first on the "SETS.TXT" file).
; Make sure that the first line in the source file contains the start of the
; extn sets data!.

; This program file should remain unaltered & only copies made from it for whatever
; use is required. P.S. I suggest that you make it a "READ ONLY" file. & store it on
; your P.C's "C:\" HARD DRIVE.

; The " ; " denotes that the data on the program file line is ignored,
; when the script is run.

; Once you have made your changes, Then save this file in a different location.
; i.e. "C:\TEMP"
; Click on the BOX marked "COMPILE & RUN" & if successful, Then you will be asked for
; the "SETS.TXT" file. Once you have found & clicked on it, The script will then start
; to run.

; There will be a % counter running on the bottom left hand side showing the
; progress of the script with number of changes left to do

; GENERAL NOTE!

; On all pre "C" Processors e.g V16.xx to 21.xx Meridian systems
; It's best to use the " ~ " symbol (This will insert a short PAUSE!).
; This is somtimes needed to give the Meridian time to process the command
; entered!.

STRING S_Time
STRING F_Time
STRING readfile
STRING DIRECTORY
INTEGER LEN=0
INTEGER CUT_OFF=0
INTEGER EVENT
LONG COUNT=0
LONG TOTAL=0
LONG PERCENT=0
LONG BIT



STRING OPDATA
STRING OPDATA_A
STRING OPDATA_B

PROC MAIN
STATMSG "Start"
dialogbox 0 236 63 205 200 2 "Out Meridian DN's via LD 83"
dirpath 1 2 14 198 11 Directory
dirlistbox 2 2 29 201 140 "D:\Program Files\Symantec\Procomm Plus\Capture\*.*" SINGLE readfile 1 SORT
pushbutton 3 110 173 40 13 "OK" OK DEFAULT
pushbutton 4 55 173 40 13 "Cancel"
text 5 2 1 61 11 "Select READ file" left
enddialog

while 1
dlgevent 0 event
switch event
case 0
endcase

case 1
endcase

case 3
exitwhile
endcase

case 4
exit
endcase

endswitch
endwhile
FOPEN 1 readfile read TEXT ; *****************CHANGE IF NECESSARY

WHILE NOT FEOF 1
FGETS 1 OPDATA
STRLEN OPDATA LEN
IF LEN<3
EXITWHILE
ENDIF

TOTAL=TOTAL+1
ENDWHILE

S_Time=$TIME
call counter

REWIND 1

WHILE NOT fEOF 1
FGETS 1 OPDATA
STRLEN OPDATA LEN
IF LEN<3
EXITWHILE
ENDIF

WHEN TARGET 1 "SCH8783" CALL SCH8825
WHEN TARGET 2 "SCH8825" CALL SCH8825
WHEN TARGET 3 "SCH0128" CALL SCH8825

SUBSTR OPDATA_A OPDATA 43 5
SUBSTR OPDATA_B OPDATA 28 12


; Make sure that you are in either LD 10 or LD 11 first on older software versions!
; TRANSMIT "LD 10^M"
; WAITFOR "REQ"
TRANSMIT "OUT^M"
WAITFOR "TYPE"
TRANSMIT OPDATA_A
TRANSMIT "^M"
WAITFOR "TN"
TRANSMIT OPDATA_B
TRANSMIT "^M"
WAITFOR "REQ"

count=count+1
CALL COUNTER

ENDWHILE

FCLOSE 1

F_Time=$TIME
usermsg "Removal of Meridian Extn's Complete`n`n at %s" F_TIME
ENDPROC

PROC COUNTER
BIT=COUNT*100
PERCENT=BIT/TOTAL

STATMSG "%i OF %i - %i %% Done - Start Time: %s" COUNT TOTAL PERCENT S_Time
ENDPROC

PROC SCH8825
TRANSMIT "**^M"
ENDPROC


##########################################################



All the best

Firebird Scrambler
Meridian Programmer in the UK

If it's working, then leave it alone!.
 
Just found my other scripts for new 500 sets below.

; 1a New wired Analogue phones.was 29th May 2009

; NOTE!
; This program will ONLY work with a Windows version of PROCOMM PLUS!.
; This Procomm Script file is for you to configure a new Nortel extension
; The " ; " denotes that the data on this program script is ignored when the
; file is run.
; The script will also record for you a LOG file such as "pw01.cap" etc.
; The program will use LD 10 for all the changes & LD 81 to print out the TN's.
; Follow the instructions by Ticking the box's on the screen & locating your source file.
; You might need to change the "Transmit Pacing" depending on the software version!
; A higher number is needed to slow the program down for the older processors.
; Make sure that you enter the file name & click on "ACCEPT" to run in your entries.

; Make sure that you enter the Login Name (or Account name for V04.5x onwards!)&
; the Password & click on the "ACCEPT" button to run in your speed call entries.
; If your system does not use any Login name, then just enter any name or c/r in the box.
; You don't need to be LOGGED into the Meridian, before you run the script!.
; The program will still run on older software versions that don't use Named Login. It's
; best if log in first before the program is started. Just enter any name as mentioned above
; & wait 30 seconds before it will commence the input procedure.

; The data that needs to be used should be entered via Microsofts Excel application, using the columns
; as shown in the example. Once you have entered in the required settings, REMOVE the header
; (1st line of data & save the SOURCE file which should be in a *.CSV Format!

; An example of the source file as viewed in text, is shown below.

; NOTE!. Please check your Excel file before you save it to a *.csv format. Then also check it using
; a program such as "Notepad" for spaces with the CLS such as CFXA ,!. Make sure it's changed to
; i.e. CFXA,. Also add in a space for blank features.i.e. DCFW etc
; This should be as follows. , , , etc. NOT ,,,.

; You can use the find & replace options to make mass changes!.

; Examples of the different phone types used on a Succession system Version 5.xx

;TYPE,TN, DES,CUST,WRLS,DN,AST,IAPG,HUNT,TGAR,NCOS,RNPG,SCPW,CLS ,RCO,EFD,EHT,FDN,CFW

;500,006 0 00 00,M500,0,NO,65600,NO,0,901283560312,0,6,500,1110,CFXA,2,65600,7000,7000,6,
;500,006 0 00 01,500,0,NO,65601,NO,0,7000,1,5,501,1111,CFXA,1,7000,65601,7000,4,
;500,006 0 00 02,M500,0,NO,65602,NO,0,7000,0,6,502,1112,USRA CFHA CFXA,0,7000,7000,65600,8,
;500,006 0 00 03,500,0,NO,65603,YES,0,7000,1,5,503,1113,CFXA,1,7000,7000,7000,5,
;500,006 0 00 04,M500,0,NO,65604,NO,0,7000,0,6,504,1114,CFXA,2,65604,7000,7000,7,
;500,006 0 00 05,500,0,NO,65605,NO,0,7000,1,5,505,1115,CFXA,1,7000,65605,7000,9,
;500,006 0 00 06,M500,0,NO,65606,NO,0,7000,0,6,506,1116,USRA CFHA CFXA,0,7000,7000,65606,10,
;500,006 0 00 07,500,0,NO,65607,YES,0,7000,1,5,507,1117,CFXA,1,7000,7000,7000,11,
;500,006 0 00 08,M500,0,NO,65608,NO,0,7000,0,6,508,1118,CFXA,2,65608,7000,7000,14,
;500,006 0 00 09,500,0,NO,65609,NO,0,7000,1,5,509,1119,CFXA,1,7000,907930941008,7000,15,
;500,006 0 00 10,M500,0,YES,65610,NO,0,7000,0,6,510,0000,USRA CFHA CFXA,0,7000,7000,65610,12,
;500,006 0 00 11,500,0,YES,65611,YES,0,7000,1,5,511,0001,CFXA,1,7000,7000,7000,16,

; If your source file (example below) has lines of data of this length or more, then the script will FAIL with a
; message of Error 1: Value out of range
; Please reduce the data for that line. e.g. a line of data that is too long is..
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA HFA CNIA DNDA PUA VOLA VOUA CFXA ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216 0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL 8 5302,SCN 4211 0,SCN 4791 0,ADL 8, ,CFW 6,RNP,SSU 10 (262 CHARACTERS!)

; Trim the data down to e.g.
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA HFA CNIA DNDA PUA VOLA VOUA CFXA ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216 0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL 8 5302,SCN 4211,SCN 4791,ADL 8, ,CFW 6,RNP,SSU 10

; Please be aware that this script to provide new Analogue phones only!

; To ensure smooth running of the script, make the TTY that you are using has "SCH" only!.
; This will prevent any system messages from appearing.

; During the running of this script, SCH error messages of the following will appear below
; SCH0030 = Digit input required rather than alpha. Re-enter only numerals.
; SCH0180 = Wrong number of input fields for prompt EXTN.
; Ignore them when using this script file. The error codes appear due to a prompt duplication that I can't resolve!.


#include "vkeys.inc" ; You must have this file "vkeys.inc"
; located within the "Aspect" folder!
STRING F_Time
string s_opdata[19]

proc main
integer i_evt
integer i_rg2_chc = 3
integer i_rg5_chc = 6
integer i_tmp
integer i_ch
integer i_fch_tx_val
integer i_tx_val
integer i_p

long l_tot_no_lin
long l_lin_cnt
long l_prog_bar_op
long l_fi_sz0
long l_cur_fi_sz0

string s_fi_nm
string s_tx_list = "0,5,10,20,30,40,50,80,100,130,180,200,300,400,500"
string s_tx_item = "130"
string s_dir
string s_pwd
string s_userid
string s_time_start
string s_date_start

string s_progress
string s_prog_bar
string s_sce_lin

string s_fi_ext_item = "*.CSV"
;string s_type_list = "CHG,NEW,OUT"
;string s_type_item = "CHG"
string s_list_customer = "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87"
string s_customer_item = "0"
string s_list_dcno = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88"
string s_dcno_item = "1"

dialogbox 0 13 17 476 332 11 "Nortel Procomm script file to add new Analogue wired (500 type) phones in LD 10. V01.1 29th May 2009"
groupbox 1 10 7 130 40 ""
radiogroup 2 i_rg2_chc
radiobutton 3 19 16 42 11 "NEW"
; radiobutton 4 19 32 42 11 "CHG"

endgroup
groupbox 41 10 46 130 60 ""
text 43 14 54 120 11 "Script CLass of Service defaults used " center
text 44 14 64 120 11 "TLD FNA HTA MWA DPUA GPUA" center
text 26 14 74 120 11 "LNA SFA CFTA HBTA ftr RDL 16" center
text 45 14 84 120 11 "This script won't do Phantom sets!" center
text 11 14 94 120 11 "TTY you are using = SCH only!" center


radiogroup 5 i_rg5_chc
radiobutton 6 87 16 50 11 "Analogue"
; radiobutton 7 87 36 42 11 "IDC"
endgroup
;combobox 10 102 67 32 252 DROPDOWNLIST s_list_customer s_customer_item
; text 16 16 69 86 11 "Customer No Use up to 87" left
; combobox 9 102 88 32 238 DROPDOWNLIST s_list_dcno s_dcno_item
; text 8 17 90 84 9 "DCNO No Use up to 88" left
dirlistbox 12 55 176 85 94 "*.csv" SINGLE s_fi_nm 21 SORT
editbox 23 386 37 73 11 s_userid 11
editbox 13 386 53 74 11 s_pwd 16 MASKED
editbox 37 417 106 38 11 s_date_start 8
editbox 38 417 147 38 11 s_time_start 8
combobox 24 423 168 30 170 DROPDOWNLIST s_tx_list s_tx_item
dirpath 21 9 164 134 11 s_dir
pushbutton 14 16 118 40 13 "Accept"
pushbutton 15 90 118 40 13 "Cancel"
text 29 169 124 294 11 "If you want the program to Time start, then enter the time in 24Hr format in the box below" center
text 47 217 55 166 11 "Switch Password is Case Sensitive for V4.5 onwards" left
text 25 175 170 246 11 "Select the systems Transmit Pacing. User a higher number on older software!." left
text 22 190 38 190 11 "Name or User ID. (No Name = any character key pressed!)" left
text 34 167 147 248 11 "Pressing the (Space Bar) = Auto Start, or enter the start Time = e.g. 16:20:00 " left
text 35 167 211 290 26 " Please remember to check your capture file settings under the following headings's (Options, Data Options, Setup Files, Capture File Options, Control Options) to UNCHECK the box marked (Query for file name when capture is started)!. " left
text 33 168 240 288 16 " Click (OK) & (OK) again before starting this script program. This will make the script capture the information if the delayed Date / Time start function is used!. " left
text 36 169 82 294 11 "If you want the program to Date start, then enter the Date as e.g. 23/12/05 in the box below" center
text 31 169 106 248 11 "Pressing the (Space Bar) = Auto Start, or enter the required Date for it to run" left
text 39 419 138 34 9 "Hr:Mn:Sc" center
text 40 418 96 34 9 "Dy/Mh/Yr" center
text 32 178 19 282 11 "Enter the systems Login Name and Password in the box's below to run the script file" center
groupbox 49 165 3 302 68 ""
groupbox 50 164 71 304 91 ""
groupbox 51 1 155 146 120 ""
groupbox 52 1 2 146 150 ""
text 53 6 220 36 11 "Source file" left
text 54 6 230 36 11 "location" center
text 42 6 240 36 11 "= *.csv" center

text 55 154 268 300 11 "Data that will need configuring! Make sure all all columns are filled in and top row removed!" center
text 64 14 278 444 11 "TYPE,TN,DES,CUST,WRLS,DN,AST,IAPG,HUNT,TGAR,NCOS,RNPG,SCPW,CLS,RCO,EFD,EHT,FDN,CFW," center
; text 65 14 288 444 11 "KEY 2,KEY 3,KEY 4,KEY 5,KEY 6,KEY 6,KEY 7,KEY 8,KEY 9,KEY 10,KEY 11,KEY 16,KEY 19,KEY 22,KEY 23," center

text 66 2 298 470 11 "Example below = data used! Also don't have ,, use , , check afterwards using notepad!" center
text 59 8 308 464 11 "500,006 0 00 00,M500,0,NO,65600,NO,0,901283560213,0,6,500,1111,CFHA CFXA, 2,7000,7000,7000,6," center
text 48 14 318 444 11 "500,006 0 00 03,500,0,NO,65601,YES,0,7000,1,5,501,1234,CFXA,1,7000,7000,901283560213,4," center

groupbox 46 164 157 304 30 ""
text 56 168 193 290 16 " If you are planning to use the delayed start time / date function, then follow the instruction listed below " left
groupbox 57 164 183 304 78 ""
groupbox 63 10 107 128 34 ""
enddialog

while 1
dlgevent 0 i_evt
switch i_evt
case 0
if i_rg2_chc == 3
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endif
if i_rg2_chc == 4
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endif
endcase
case 5
if i_rg5_chc == 7
enable dlgctrl 0 8
enable dlgctrl 0 16
endif
if i_rg5_chc == 6
disable dlgctrl 0 8
disable dlgctrl 0 16
endif
endcase

case 13
strlen s_pwd i_tmp
if i_tmp < 4
usermsg "Password `"%s`"`n`nThis must be between 4-16 characters in length & it is case sEnsTivE on V04.50 onwards!" s_pwd
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 14
exitwhile
endcase
case 15
exitwhile
endcase
case 23
strlen s_userid i_tmp
if i_tmp < 1
usermsg "Name or UserID `"%s`"`n`nName can be up to 11 Characters. Otherwise enter a dummy name or press the Space Bar to accept the entry" s_userid
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 28
exitwhile
endcase
case 29
exitwhile
endcase
case 30
dlgupdate 0 24
endcase
case 37
strlen s_date_start i_tmp
if i_tmp < 1
usermsg "Start Date `"%s`"`n`nmust be 6 Numbers in length and with a (/) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_date_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 38
strlen s_time_start i_tmp
if i_tmp < 1
usermsg "Start Time `"%s`"`n`nmust be 6 Numbers in length and with a :)) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_time_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
endswitch
endwhile

dlgdestroy 0 cancel

if i_evt != 14
exit
endif

if not fopen 0 s_fi_nm read
errormsg "Couldn't open file `"%s`"." s_fi_nm
else
cnt_no_fi_lines(i_ch,&l_tot_no_lin,&l_fi_sz0)

STATMSG "Waiting for the Analogue set auto start date/time program to run. Make sure that auto capture is set correctly!"

fetch txpace i_fch_tx_val
atoi s_tx_item i_tx_val
strcat s_tx_item " ms"
set txpace i_tx_val

datetimestart(s_time_start,s_date_start)
logi(s_userid)
login(s_pwd)

STATMSG "The Analogue set auto start date/time program has now started!"

ld_ovl_10(i_rg2_chc)

dialogbox 1 208 20 312 116 14 "New wired Analogue phones progress status bar"
text 1 10 8 200 11 s_progress left
editbox 2 10 20 190 11 s_prog_bar
text 3 10 38 300 18 s_fi_nm left
text 4 212 20 58 11 "Transmit Pace ==" left
text 6 10 60 300 34 s_sce_lin left
text 5 276 20 34 11 s_tx_item left
text 7 14 94 270 11 "Make sure that the TTY you are using to run this script file has USER = SCH only!" center
text 8 2 104 310 11 "When using this script file ignore any SCH 0030 and 0180 error codes due to a prompt duplication." center

enddialog

l_prog_bar_op = l_fi_sz0/40

while not feof 0
fgetc 0 i_ch
if not feof 0
ftell 0 l_cur_fi_sz0
if l_cur_fi_sz0 % l_prog_bar_op == 0
strcat s_prog_bar "#"
dlgupdate 1 2
endif
if i_ch == '`r'
loopwhile
endif
if i_ch == '`n'
l_lin_cnt++
strputc s_sce_lin i_p 0
if not nullstr s_sce_lin

get_opdata(s_sce_lin)

strfmt s_progress "Line %ld of %ld" l_lin_cnt l_tot_no_lin
dlgupdate 1 1
dlgupdate 1 6
s_sce_lin = ""
i_p = 0

send_opdata()

loopwhile
endif
endif
strputc s_sce_lin i_p i_ch
i_p++
endif
endwhile


; ex_ovl_11(s_customer_item)
ex_ovl_11()

logo ()
set txpace i_fch_tx_val
fclose 0

endif

dlgdestroy 1 cancel

endproc

proc get_opdata ;#####

param string s_sce_lin

strtok s_opdata[0] s_sce_lin "," ;TYPE
strtok s_opdata[1] s_sce_lin "," ;TN
strtok s_opdata[2] s_sce_lin "," ;DES
strtok s_opdata[3] s_sce_lin "," ;Customer Number
strtok s_opdata[4] s_sce_lin "," ;WRLS
strtok s_opdata[5] s_sce_lin "," ;DN
strtok s_opdata[6] s_sce_lin "," ;AST
strtok s_opdata[7] s_sce_lin "," ;IAPG
strtok s_opdata[8] s_sce_lin "," ;HUNT
strtok s_opdata[9] s_sce_lin "," ;TGAR
strtok s_opdata[10] s_sce_lin "," ;NCOS
strtok s_opdata[11] s_sce_lin "," ;RNPG
strtok s_opdata[12] s_sce_lin "," ;SCPW
strtok s_opdata[13] s_sce_lin "," ;CLS
strtok s_opdata[14] s_sce_lin "," ;RCO
strtok s_opdata[15] s_sce_lin "," ;EFD
strtok s_opdata[16] s_sce_lin "," ;EHT
strtok s_opdata[17] s_sce_lin "," ;FDN
strtok s_opdata[18] s_sce_lin "," ;CFW
; strtok s_opdata[19] s_sce_lin "," ;DCFW

endproc

proc send_opdata ;##### Sequence of changes and data input

; waitfor "TYPE"
txdc (s_opdata[0])
waitfor "TN "
txdc (s_opdata[1])
waitfor "DES "
txdc (s_opdata[2])
waitfor "CUST "
txdc (s_opdata[3])
waitfor "WRLS "
txdc (s_opdata[4])
waitfor "DN "
txdc (s_opdata[5])
waitfor "AST "
txdc (s_opdata[6])
waitfor "IAPG "
txdc (s_opdata[7])
waitfor "HUNT "
txdc (s_opdata[8])
waitfor "TGAR "
txdc (s_opdata[9])
waitfor "NCOS "
txdc (s_opdata[10])
waitfor "RNPG "
txdc (s_opdata[11])
waitfor "SCPW "
txdc (s_opdata[12])
waitfor "CLS "
transmit "TLD FNA HTA SFA CFTA HBTA LNA MWA DPUA GPUA " ; #### Applies to all phones! ####
txdc (s_opdata[13])
waitfor "RCO "
txdc (s_opdata[14])
waitfor "FTR "
transmit "RDL 16^M"
waitfor "FTR "
transmit "EFD "
txdc (s_opdata[15])
waitfor "FTR "
transmit "EHT "
txdc (s_opdata[16])
waitfor "FTR "
transmit "FDN "
txdc (s_opdata[17])
waitfor "FTR "
transmit "CFW "
txdc (s_opdata[18])
waitfor "FTR "
; transmit "DCFW "
; txdc (s_opdata[19])
; waitfor "FTR "
pause 1
txdc ("")
waitfor "REQ" forever

txdc ("NEW")

; else
; endif

endproc

proc cnt_no_fi_lines ;#####

param integer i_ch
param long l_tot_no_lin
param long l_fi_sz0

while not feof 0
fgetc 0 i_ch
if not feof 0
if i_ch == '`n'
l_tot_no_lin++
endif
endif
endwhile

ftell 0 l_fi_sz0
rewind 0

endproc

;proc txdt ;#####

;param string s_txs
;integer i_p = 0
;integer i_ch = -1

; strgetc s_txs i_P i_ch
; i_p++

; while i_ch != 0
; computc i_ch
; strgetc s_txs i_P i_ch
; i_P++
; endwhile

;endproc

proc txdc ;#####

param string s_txs
integer i_p = 0
integer i_ch = -1

strgetc s_txs i_P i_ch
i_p++

while i_ch != 0
computc i_ch
strgetc s_txs i_P i_ch
i_P++
endwhile

computc 13

endproc

proc ld_ovl_10 ;#####

param integer i_rg2_chc

Capture On

; In this area, enter in new prompts that have appeared when running this script using examples
; listed below. Different features & software versions will result in prompts that have not been
; spotted before.

WHEN TARGET 1 "OVL111 " CALL OVL111
WHEN TARGET 2 "OVL013 " CALL OVL013
WHEN TARGET 3 "CTYP " CALL CARR_RETURN
WHEN TARGET 4 "CDEN " CALL CARR_RETURN
WHEN TARGET 5 "WTYP " CALL WTYP_MCMO
WHEN TARGET 6 "MWUN " CALL MWUN_16
WHEN TARGET 7 "DIG " CALL CARR_RETURN
; WHEN TARGET 8 "DBA " CALL CARR_RETURN
WHEN TARGET 9 "ERL " CALL CARR_RETURN
WHEN TARGET 10 "ECL " CALL CARR_RETURN
WHEN TARGET 11 "LDN " CALL CARR_RETURN
WHEN TARGET 13 "SGRP " CALL CARR_RETURN
WHEN TARGET 14 "SFLT " CALL CARR_RETURN
WHEN TARGET 15 "CAC_MFC " CALL CARR_RETURN
WHEN TARGET 20 "LNRS " CALL CARR_RETURN
WHEN TARGET 21 "LHK " CALL CARR_RETURN
WHEN TARGET 22 "SCI " CALL CARR_RETURN
WHEN TARGET 23 "PLEV " CALL PLEV_0
; WHEN TARGET 24 "DANI " CALL CARR_RETURN
; WHEN TARGET 25 "ITNA " CALL CARR_RETURN
WHEN TARGET 26 "PRI " CALL CARR_RETURN
WHEN TARGET 27 "MLWU_LANG " CALL CARR_RETURN
WHEN TARGET 28 "MLNG " CALL CARR_RETURN
; WHEN TARGET 29 "DNDR " CALL CARR_RETURN
WHEN TARGET 30 " MARP ON" CALL MARP_NO
WHEN TARGET 31 " CPND " CALL CARR_RETURN
WHEN TARGET 32 " VMB " CALL CARR_RETURN

WHEN TARGET 40 "TEN " CALL CARR_RETURN
WHEN TARGET 41 "ECHG " CALL EASY_CHANGE
WHEN TARGET 42 "DATE " CALL CARR_RETURN
WHEN TARGET 43 "PAGE " CALL CARR_RETURN
WHEN TARGET 44 "NACT " CALL CARR_RETURN
WHEN TARGET 45 "ZONE " CALL ZONE_1
WHEN TARGET 49 "SCH0030 " CALL SCH0030
WHEN TARGET 50 "SCH0127 " CALL SCH0127
WHEN TARGET 51 "SCH0255 " CALL SCH0255
WHEN TARGET 52 "SCH0361 " CALL SCH0361
WHEN TARGET 53 "SCH0717 " CALL SCH0717
WHEN TARGET 54 "SCH0733 " CALL SCH0733
WHEN TARGET 55 "SCH1447 " CALL SCH1447
WHEN TARGET 56 "SCH1510 " CALL SCH1510
WHEN TARGET 57 "SCH1893 " CALL SCH1893
WHEN TARGET 58 "SCH3127 " CALL SCH3127
WHEN TARGET 59 "SCH3129 " CALL SCH3129
WHEN TARGET 60 "SCH6711 " CALL SCH6711

; WHEN TARGET 61 "SCH3127 " CALL SCH3127
; WHEN TARGET 62 "SCH6711 " CALL SCH6711
WHEN TARGET 81 "SCH8888 " CALL SCH8888
WHEN TARGET 82 "SCH8889 " CALL SCH8889


txdc ("****")
waitfor ">"

txdc ("LD 10") ; Start of access into LD 10
waitfor "REQ"
if i_rg2_chc == 3
txdc ("NEW")
else
txdc ("CHG")
endif
waitfor "TYPE"

STATMSG " Start of Progress status bar and new extensions to be provided in LD 10"

endproc

proc ex_ovl_11 ;##### Print out the sets in LD 81

;param string s_customer_item

pause 3
txdc ("")
txdc ("****")
waitfor ">"

txdc ("LD 81")
waitfor "REQ "
txdc ("LST")
waitfor "CUST "
txdc ("0")
; waitfor "DATE "
; txdc ("")
; waitfor "PAGE "
; txdc ("")
waitfor "DES "
txdc ("")
waitfor "FEAT "
txdc ("500")
waitfor "FEAT "
txdc ("")
waitfor "REQ "
txdc ("****")
waitfor ">"

Capture off

endproc

PROC DATETIMESTART

param string s_time_start
param string s_date_start
integer i_tmp

strlen s_date_start i_tmp
if i_tmp >5
strlen s_time_start i_tmp
if i_tmp <2
s_time_start = "00:10:00"
endif
endif
strlen s_time_start i_tmp
if i_tmp >5
strlen s_date_start i_tmp
if i_tmp <2
s_date_start = $DATE
endif
endif

Waituntil s_time_start s_date_start
endproc

Proc TTY_LOGIN
pause 3
txdc ("LOGI")
endproc

proc logi ;#####
param string s_userid

WHEN TARGET 0 "OVL014 " CALL OVL014
WHEN TARGET 1 "OVL428 " CALL OVL428
WHEN TARGET 2 "SCH0510 " CALL OVL014
WHEN TARGET 3 "OVL013 " CALL TTY_LOGIN
WHEN TARGET 5 "OVL111 " CALL OVL111
WHEN TARGET 6 "SCH0510 " CALL SCH0101
WHEN TARGET 7 "SCH101 " CALL SCH0101

transmit "LOGI "
; txdc ("LOGI ")
txdc (s_userid)
waitfor "PASS?"
endproc

proc login ;#####
param string s_pwd
txdc (s_pwd)
waitfor ">"
endproc

proc logo ;#####
txdc ("LOGO") ; Add on this line ";" to allow the program to remain logged in!.
F_Time=$TIME
statmsg "LD 10 New Analogue Set script file has now been Completed`n`n at %s" F_TIME

usermsg "LD 10 New Analogue Set script file is now Complete`n`n at %s" F_TIME
endproc

PROC PLEV_0
txdc ("0")
ENDPROC

PROC ZONE_1 ; ############# Change to Zone required! ############
; pause 1
txdc ("1")
ENDPROC

PROC CARR_RETURN
txdc ("")
ENDPROC

PROC WTYP_MCMO
; pause 1
txdc ("MCMO")
ENDPROC

PROC MWUN_16
; pause 1
txdc ("16")
ENDPROC

PROC EASY_CHANGE
pause 1
txdc ("NO")
ENDPROC

Proc OVL013
txdc ("****")
ENDPROC

PROC SCH0030
STATMSG "Ignore the SCH0030 and SCH0180 error codes. They appear due to a prompt duplication that I can't resolve!.!"
ENDPROC

PROC SCH0127
txdc ("****")
waitfor ">"
USERMSG "SCH0127. Script failed, due to the TN already exists on the system!"
exit
ENDPROC

PROC SCH0255
STATMSG "SCH0255. Illegal Hunt DN.!"
ENDPROC

PROC SCH0361
STATMSG "SCH0361. Key number is not valid on this set type.!"
ENDPROC

PROC SCH0717
txdc ("****")
waitfor ">"
USERMSG "SCH0717. Script failed, due to a missing ACD DN in LD 23!"
exit
ENDPROC

PROC SCH0733
; txdc ("****")
; waitfor ">"
STATMSG "SCH0733. Unable to match input field with stored mnemonics.!"
ENDPROC

PROC SCH1447
STATMSG "SCH1447. Key 6 should be set as NUL on this 3905 Set. Redefining this key overrides the user's access to Directory.!"
ENDPROC

PROC SCH1510
txdc ("TLD FNA HTA SFA CFTA HBTA LNA MWA DPUA GPUA CFHA USRA")
STATMSG "SCH1510. Invalid CLS input. Typical CLS settings for configuring this set are used instead.!"
ENDPROC

PROC SCH1893
txdc ("****")
waitfor ">"
USERMSG "SCH1893. Script failed. Corporate Directory not allowed for this set type!"
exit
ENDPROC

PROC SCH3127
txdc ("****")
waitfor ">"
STATMSG "SCH3127. Invalid AST key type. Only ACD, MCR, MCN, SCR and SCN key are supported.!"
ENDPROC

PROC SCH3129
STATMSG "SCH3129. This DN already has AST assigned and this TN is configured with CLS ICRD!"
ENDPROC

PROC SCH6711
txdc ("*")
STATMSG "SCH6711. No trailing blanks/spaces can be entered after the CLID entry.Enter {CR} after the CLID entry!"
ENDPROC

PROC SCH8888
STATMSG "SCH8888. The Station Control Password can only use digits 0-9. Check if SCPW was needed after script file has finished!."
ENDPROC

PROC SCH8889
waitfor "SCPW "
txdc ("")
pause 1
STATMSG "SCH8889. CEPT default does not match the password length defined in LD 15. Check if SCPW was needed after script file has finished!."
ENDPROC

PROC MARP_NO
; pause 1
txdc ("NO")
; pause 1
ENDPROC

PROC OVL014
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
ENDPROC

PROC OVL111
txdc ("****")
waitfor ">"
USERMSG "Script failed, as the TTY user is NOT logged into the system!"
exit
ENDPROC

PROC OVL428
txdc ("****")
USERMSG "Script failed. The Login name & password combination is invalid. Check the password & login name & try again.! On software versions V04.5x onwards, check if the password uses case SeNSiTivItY!"
exit
ENDPROC

PROC SCH0101
pause 2
transmit "****^M"
waitfor ">"
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
ENDPROC


; The information listed below has been taken from the "vkeys.inc" file.
; I have added in one ";" against each line for use with this file!.
; Should your copy of "vkeys.inc" be missing or damaged, then you can copy this
; section listed below with one of the ";" removed for each line!.

;;Definitions of standard virtual key code values
;;**********************************************************************
;;* VKEYS.INC
;;* Copyright (c) 1999 Symantec Corporation
;;*
;;* Definitions of standard virtual key code values. Use these macro
;;* definitions in your ASPECT script files rather than hard-coded
;;* constants to improve maintainability and readability. For more
;;* information, see the keyval and vkey conventions described in the
;;* Windows ASPECT Script Language reference manual.
;;**********************************************************************

;#ifndef _INC_VKEYS ; if file not already included
;#define _INC_VKEYS ; prevent further inclusion

;;**********************************************************************
;;* Macro definitions of standard virtual key code values
;;**********************************************************************

;#define VK_LBUTTON 0x01 ; Left mouse button
;#define VK_RBUTTON 0x02 ; Right mouse button
;#define VK_CANCEL 0x03 ; Ctrl-Break
;#define VK_MBUTTON 0x04 ; Middle mouse button
;; 0x05-0x07 ; Undefined
;#define VK_BACK 0x08 ; Backspace key
;#define VK_TAB 0x09 ; Tab key
;; 0x0A-0x0B ; Undefined
;#define VK_CLEAR 0x0C ; Clear key or Keypad 5 with Num lock off
;#define VK_RETURN 0x0D ; Enter or Return key
;; 0x0E-0x0F ; Undefined
;#define VK_SHIFT 0x10 ; Shift key
;#define VK_CONTROL 0x11 ; Control or Ctrl key
;#define VK_MENU 0x12 ; Menu or Alt key
;#define VK_PAUSE 0x13 ; Pause key
;#define VK_CAPITAL 0x14 ; Capital or Caps Lock key
;; 0x15-0x19 ; Reserved for Kanji Systems
;; 0x1A ; Undefined
;#define VK_ESCAPE 0x1B ; Esc or Escape key
;; 0x1C-0x1F ; Reserved for Kanji Systems
;#define VK_SPACE 0x20 ; Spacebar
;#define VK_PRIOR 0x21 ; Page Up key
;#define VK_NEXT 0x22 ; Page Down key
;#define VK_END 0x23 ; End key
;#define VK_HOME 0x24 ; Home key
;#define VK_LEFT 0x25 ; Left arrow key
;#define VK_UP 0x26 ; Up Arrow key
;#define VK_RIGHT 0x27 ; Right Arrow key
;#define VK_DOWN 0x28 ; Down Arrow key
;#define VK_SELECT 0x29 ; Select key
;#define VK_PRINT 0x2A ; Keyboard (OEM) specific
;#define VK_EXECUTE 0x2B ; Execute key
;#define VK_SNAPSHOT 0x2C ; Print Screen key
;#define VK_INSERT 0x2D ; Insert key
;#define VK_DELETE 0x2E ; Delete key
;#define VK_HELP 0x2F ; Help key
;#define VK_0 0x30 ; 0 key
;#define VK_1 0x31 ; 1 key
;#define VK_2 0x32 ; 2 key
;#define VK_3 0x33 ; 3 key
;#define VK_4 0x34 ; 4 key
;#define VK_5 0x35 ; 5 key
;#define VK_6 0x36 ; 6 key
;#define VK_7 0x37 ; 7 key
;#define VK_8 0x38 ; 8 key
;#define VK_9 0x39 ; 9 key
;; 0x3A-0x40 ; Undefined
;#define VK_A 0x41 ; A key
;#define VK_B 0x42 ; B key
;#define VK_C 0x43 ; C key
;#define VK_D 0x44 ; D key
;#define VK_E 0x45 ; E key
;#define VK_F 0x46 ; F key
;#define VK_G 0x47 ; G key
;#define VK_H 0x48 ; H key
;#define VK_I 0x49 ; I key
;#define VK_J 0x4A ; J key
;#define VK_K 0x4B ; K key
;#define VK_L 0x4C ; L key
;#define VK_M 0x4D ; M key
;#define VK_N 0x4E ; N key
;#define VK_O 0x4F ; O key
;#define VK_P 0x50 ; P key
;#define VK_Q 0x51 ; Q key
;#define VK_R 0x52 ; R key
;#define VK_S 0x53 ; S key
;#define VK_T 0x54 ; T key
;#define VK_U 0x55 ; U key
;#define VK_V 0x56 ; V key
;#define VK_W 0x57 ; W key
;#define VK_X 0x58 ; X key
;#define VK_Y 0x59 ; Y key
;#define VK_Z 0x5A ; Z key
;#define VK_WINDOWSL 0x5B ; Windows key (left)
;#define VK_WINDOWSR 0x5C ; Windows key (right)
;#define VK_APPLICATION 0x5D ; Application key
;; 0x5E-0x5F ; Undefined
;#define VK_NUMPAD0 0x60 ; Numeric Keypad 0
;#define VK_NUMPAD1 0x61 ; Numeric Keypad 1
;#define VK_NUMPAD2 0x62 ; Numeric Keypad 2
;#define VK_NUMPAD3 0x63 ; Numeric Keypad 3
;#define VK_NUMPAD4 0x64 ; Numeric Keypad 4
;#define VK_NUMPAD5 0x65 ; Numeric Keypad 5
;#define VK_NUMPAD6 0x66 ; Numeric Keypad 6
;#define VK_NUMPAD7 0x67 ; Numeric Keypad 7
;#define VK_NUMPAD8 0x68 ; Numeric Keypad 8
;#define VK_NUMPAD9 0x69 ; Numeric Keypad 9
;#define VK_MULTIPLY 0x6A ; Multiply key
;#define VK_ADD 0x6B ; Add key
;#define VK_SEPARATOR 0x6C ; Separator key
;#define VK_SUBTRACT 0x6D ; Subtract key
;#define VK_DECIMAL 0x6E ; Decimal key
;#define VK_DIVIDE 0x6F ; Divide key
;#define VK_F1 0x70 ; Function key F1
;#define VK_F2 0x71 ; Function key F2
;#define VK_F3 0x72 ; Function key F3
;#define VK_F4 0x73 ; Function key F4
;#define VK_F5 0x74 ; Function key F5
;#define VK_F6 0x75 ; Function key F6
;#define VK_F7 0x76 ; Function key F7
;#define VK_F8 0x77 ; Function key F8
;#define VK_F9 0x78 ; Function key F9
;#define VK_F10 0x79 ; Function key F10
;#define VK_F11 0x7A ; Function key F11
;#define VK_F12 0x7B ; Function key F12
;#define VK_F13 0x7C ; Function key F13
;#define VK_F14 0x7D ; Function key F14
;#define VK_F15 0x7E ; Function key F15
;#define VK_F16 0x7F ; Function key F16
;#define VK_F17 0x80 ; Function key F17
;#define VK_F18 0x81 ; Function key F18
;#define VK_F19 0x82 ; Function key F19
;#define VK_F20 0x83 ; Function key F20
;#define VK_F21 0x84 ; Function key F21
;#define VK_F22 0x85 ; Function key F22
;#define VK_F23 0x86 ; Function key F23
;#define VK_F24 0x87 ; Function key F24
;; 0x88-0x8F ; Unassigned
;#define VK_NUMLOCK 0x90 ; Num Lock key
;#define VK_OEM_SCROLL 0x91 ; Scroll Lock key
;; 0x92-0xB9 ; Unassigned
;; 0xBA-0xC0 ; Keyboard (OEM) specific
;; 0xC1-0xDA ; Unassigned
;; 0xDB-0xE4 ; Keyboard (OEM) specific
;; 0xE5 ; Unassigned
;; 0xE6 ; Keyboard (OEM) specific
;; 0xE7-0xE8 ; Unassigned
;; 0xE9-0xF5 ; Keyboard (OEM) specific
;; 0xF6-0xFE ; Unassigned

;;**********************************************************************
;;* Useful macros for testing and forming key values from keyboard
;;* shift states and virtual key code values.
;;**********************************************************************

;#define KV_SHIFT 0x01 ; Shift key pressed
;#define KV_CTRL 0x02 ; Ctrl key pressed
;#define KV_ALT 0x04 ; Alt key pressed
;#define KV_EXT 0x08 ; Extended key flag
;#define KV_CAPSLOCK 0x10 ; Caps Lock key toggled on

;#define MAKE_KV(skeys,vkey) (((skeys) << 8) | (vkey))

;#define KV_VKEY(keyval) ((keyval) & 0xFF)
;#define KV_SKEYS(keyval) ((keyval) >> 8)

;#define KV_SHIFTKEY(keyval) (KV_SKEYS(keyval) & KV_SHIFT)
;#define KV_CTRLKEY(keyval) (KV_SKEYS(keyval) & KV_CTRL)
;#define KV_ALTKEY(keyval) (KV_SKEYS(keyval) & KV_ALT)
;#define KV_EXTKEY(keyval) (KV_SKEYS(keyval) & KV_EXT)

;#endif ; _INC_VKEYS


##########################################################

; 1a New Phantom phones.was 29th May 2009

; NOTE!
; This program will ONLY work with a Windows version of PROCOMM PLUS!.
; This Procomm Script file is for you to configure a new Nortel extension
; The " ; " denotes that the data on this program script is ignored when the
; file is run.
; The script will also record for you a LOG file such as "pw01.cap" etc.
; The program will use LD 10 for all the changes & LD 81 to print out the TN's.
; Follow the instructions by Ticking the box's on the screen & locating your source file.
; You might need to change the "Transmit Pacing" depending on the software version!
; A higher number is needed to slow the program down for the older processors.
; Make sure that you enter the file name & click on "ACCEPT" to run in your entries.

; Make sure that you enter the Login Name (or Account name for V04.5x onwards!)&
; the Password & click on the "ACCEPT" button to run in your speed call entries.
; If your system does not use any Login name, then just enter any name or c/r in the box.
; You don't need to be LOGGED into the Meridian, before you run the script!.
; The program will still run on older software versions that don't use Named Login. It's
; best if log in first before the program is started. Just enter any name as mentioned above
; & wait 30 seconds before it will commence the input procedure.

; The data that needs to be used should be entered via Microsofts Excel application, using the columns
; as shown in the example. Once you have entered in the required settings, REMOVE the header
; (1st line of data & save the SOURCE file which should be in a *.CSV Format!

; An example of the source file as viewed in text, is shown below.

; NOTE!. Please check your Excel file before you save it to a *.csv format. Then also check it using
; a program such as "Notepad" for spaces with the CLS such as CFXA ,!. Make sure it's changed to
; i.e. CFXA,. Also add in a space for blank features.i.e. DCFW etc
; This should be as follows. , , , etc. NOT ,,,.

; You can use the find & replace options to make mass changes!.

; Examples of the different phone types used on a Succession system Version 5.xx

;TYPE,TN, DES,CUST,DN,TGAR,NCOS,SCPW,CLS,CFW,DCFW

;500,061 0 00 00,PHANTM,0,65700,0,6,1110,CFXA,6,12 901283560312
;500,061 0 00 01,PHANTM,0,65701,1,5,1111,CFXA,4,4 7001
;500,061 0 00 02,PHANTM,0,65702,0,6,1112, ,8,6 7000,
;500,061 0 00 03,PHANTM,0,65703,1,5,1113,CFXA,5,12 907930941008
;500,061 0 00 04,PHANTM,0,65704,0,6,1114, , , ,
;500,061 0 00 05,PHANTM,0,65705,1,5,1115,CFXA,9,9 91234567
;500,061 0 00 06,PHANTM,0,65706,0,6,1116,CFXA,10,10 7000
;500,061 0 00 07,PHANTM,0,65707,1,5,1117,CFXA,11, ,
;500,061 0 00 08,PHANTM,0,65708,0,6,1118,CFXA,14,4 7000
;500,061 0 00 09,PHANTM,0,65709,1,5,1119,CFXA,15, ,
;500,061 0 00 10,PHANTM,0,65710,0,6,0000,CFXA, ,12 90800679701,
;500,061 0 00 11,PHANTM,0,65711,1,5,0001,CFXA,16, ,
;500,062 0 00 01,SVCES,0,7001,0,0, , , ,4 7000,
;500,062 0 00 02,SVCES,0,7002,0,0, , , ,4 7000,
;500,062 0 00 03,SVCES,0,7003,0,0, , , ,4 7000,
;500,062 0 00 04,SVCES,0,7004,0,0, , , ,4 7000,
;500,062 0 00 05,SVCES,0,7005,0,0, , , ,4 7000,

; If your source file (example below) has lines of data of this length or more, then the script will FAIL with a
; message of Error 1: Value out of range
; Please reduce the data for that line. e.g. a line of data that is too long is..
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA HFA CNIA DNDA PUA VOLA VOUA CFXA ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216 0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL 8 5302,SCN 4211 0,SCN 4791 0,ADL 8, ,CFW 6,RNP,SSU 10 (262 CHARACTERS!)

; Trim the data down to e.g.
;1140,066 0 00 25,1140,0,74210,1,6,1421,10,1111,FBA CRPA HFA CNIA DNDA PUA VOLA VOUA CFXA ICRA,2,7000,74210,74210,0,0,SCR 4213 0,SCN 4212 0,SCN 4216 0,SCN 4218 0,SCN 4219 0,SCN 4222,ADL 8 4230,ADL 8 4019,ADL 8 5302,SCN 4211,SCN 4791,ADL 8, ,CFW 6,RNP,SSU 10

; Please be aware that this script to provide new Phantom phones only and has been compiled to allow for use with Call Pilot service DN's!

; To ensure smooth running of the script, make the TTY that you are using has "SCH" only!.
; This will prevent any system messages from appearing.

; During the running of this script, SCH error messages of the following may appear below
; SCH0030 = Digit input required rather than alpha. Re-enter only numerals.
; SCH0180 = Wrong number of input fields for prompt EXTN.
; Ignore them when using this script file. The error codes appear due to a prompt duplication that I can't resolve!.


#include "vkeys.inc" ; You must have this file "vkeys.inc"
; located within the "Aspect" folder!
STRING F_Time
string s_opdata[11]

proc main
integer i_evt
integer i_rg2_chc = 3
integer i_rg5_chc = 6
integer i_tmp
integer i_ch
integer i_fch_tx_val
integer i_tx_val
integer i_p

long l_tot_no_lin
long l_lin_cnt
long l_prog_bar_op
long l_fi_sz0
long l_cur_fi_sz0

string s_fi_nm
string s_tx_list = "0,5,10,20,30,40,50,80,100,130,180,200,300,400,500"
string s_tx_item = "130"
string s_dir
string s_pwd
string s_userid
string s_time_start
string s_date_start

string s_progress
string s_prog_bar
string s_sce_lin

string s_fi_ext_item = "*.CSV"
;string s_type_list = "CHG,NEW,OUT"
;string s_type_item = "CHG"
string s_list_customer = "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87"
string s_customer_item = "0"
string s_list_dcno = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88"
string s_dcno_item = "1"

dialogbox 0 13 17 476 332 11 "Nortel Procomm script file to add new Phantom and Call Pilot Service DN's in LD 10. V01.1 29th May 2009"
groupbox 1 10 7 130 40 ""
radiogroup 2 i_rg2_chc
radiobutton 3 19 16 42 11 "NEW"
; radiobutton 4 19 32 42 11 "CHG"

endgroup
groupbox 41 10 46 130 60 ""
text 43 14 54 120 11 "Script CLass of Service defaults used " center
text 44 14 64 120 11 "TLD FNA SFA" center
text 26 14 74 120 11 "Add in CLS CFXA for external access" center
text 45 14 84 120 11 "This script will only do Phantom sets!" center
text 11 14 94 120 11 "TTY you are using = SCH only!" center


radiogroup 5 i_rg5_chc
radiobutton 6 87 16 50 11 "Phantom"
; radiobutton 7 87 36 42 11 "IDC"
endgroup
;combobox 10 102 67 32 252 DROPDOWNLIST s_list_customer s_customer_item
; text 16 16 69 86 11 "Customer No Use up to 87" left
; combobox 9 102 88 32 238 DROPDOWNLIST s_list_dcno s_dcno_item
; text 8 17 90 84 9 "DCNO No Use up to 88" left
dirlistbox 12 55 176 85 94 "*.csv" SINGLE s_fi_nm 21 SORT
editbox 23 386 37 73 11 s_userid 11
editbox 13 386 53 74 11 s_pwd 16 MASKED
editbox 37 417 106 38 11 s_date_start 8
editbox 38 417 147 38 11 s_time_start 8
combobox 24 423 168 30 170 DROPDOWNLIST s_tx_list s_tx_item
dirpath 21 9 164 134 11 s_dir
pushbutton 14 16 118 40 13 "Accept"
pushbutton 15 90 118 40 13 "Cancel"
text 29 169 124 294 11 "If you want the program to Time start, then enter the time in 24Hr format in the box below" center
text 47 217 55 166 11 "Switch Password is Case Sensitive for V4.5 onwards" left
text 25 175 170 246 11 "Select the systems Transmit Pacing. User a higher number on older software!." left
text 22 190 38 190 11 "Name or User ID. (No Name = any character key pressed!)" left
text 34 167 147 248 11 "Pressing the (Space Bar) = Auto Start, or enter the start Time = e.g. 16:20:00 " left
text 35 167 211 290 26 " Please remember to check your capture file settings under the following headings's (Options, Data Options, Setup Files, Capture File Options, Control Options) to UNCHECK the box marked (Query for file name when capture is started)!. " left
text 33 168 240 288 16 " Click (OK) & (OK) again before starting this script program. This will make the script capture the information if the delayed Date / Time start function is used!. " left
text 36 169 82 294 11 "If you want the program to Date start, then enter the Date as e.g. 23/12/05 in the box below" center
text 31 169 106 248 11 "Pressing the (Space Bar) = Auto Start, or enter the required Date for it to run" left
text 39 419 138 34 9 "Hr:Mn:Sc" center
text 40 418 96 34 9 "Dy/Mh/Yr" center
text 32 178 19 282 11 "Enter the systems Login Name and Password in the box's below to run the script file" center
groupbox 49 165 3 302 68 ""
groupbox 50 164 71 304 91 ""
groupbox 51 1 155 146 120 ""
groupbox 52 1 2 146 150 ""
text 53 6 220 36 11 "Source file" left
text 54 6 230 36 11 "location" center
text 42 6 240 36 11 "= *.csv" center

text 55 154 268 300 11 "Data that will need configuring! Make sure all all columns are filled in and top row removed!" center
text 64 14 278 444 11 "TYPE,TN,DES,CUST,DN,TGAR,NCOS,SCPW,CLS,CFW,DCFW" center
; text 65 14 288 444 11 "KEY 2,KEY 3,KEY 4,KEY 5,KEY 6,KEY 6,KEY 7,KEY 8,KEY 9,KEY 10,KEY 11,KEY 16,KEY 19,KEY 22,KEY 23," center

text 66 2 298 470 11 "Example below = data used! Also don't have ,, use , , check afterwards using notepad!" center
text 59 8 308 464 11 "500,061 0 00 00,PHANTM,0,65700,0,6,1110,CFXA,6,12 901283560312" center
text 48 14 318 444 11 "500,062 0 00 04,SVCES,0,7005,0,0, , , ,4 7000," center

groupbox 46 164 157 304 30 ""
text 56 168 193 290 16 " If you are planning to use the delayed start time / date function, then follow the instruction listed below " left
groupbox 57 164 183 304 78 ""
groupbox 63 10 107 128 34 ""
enddialog

while 1
dlgevent 0 i_evt
switch i_evt
case 0
if i_rg2_chc == 3
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endif
if i_rg2_chc == 4
if nullstr s_date_start
disable dlgctrl 0 14
elseif nullstr s_time_start
disable dlgctrl 0 14
elseif nullstr s_userid
disable dlgctrl 0 14
elseif nullstr s_pwd
disable dlgctrl 0 14
elseif nullstr s_fi_nm
disable dlgctrl 0 14
else
enable dlgctrl 0 14
endif
endif
endcase
case 5
if i_rg5_chc == 7
enable dlgctrl 0 8
enable dlgctrl 0 16
endif
if i_rg5_chc == 6
disable dlgctrl 0 8
disable dlgctrl 0 16
endif
endcase

case 13
strlen s_pwd i_tmp
if i_tmp < 4
usermsg "Password `"%s`"`n`nThis must be between 4-16 characters in length & it is case sEnsTivE on V04.50 onwards!" s_pwd
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 14
exitwhile
endcase
case 15
exitwhile
endcase
case 23
strlen s_userid i_tmp
if i_tmp < 1
usermsg "Name or UserID `"%s`"`n`nName can be up to 11 Characters. Otherwise enter a dummy name or press the Space Bar to accept the entry" s_userid
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 28
exitwhile
endcase
case 29
exitwhile
endcase
case 30
dlgupdate 0 24
endcase
case 37
strlen s_date_start i_tmp
if i_tmp < 1
usermsg "Start Date `"%s`"`n`nmust be 6 Numbers in length and with a (/) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_date_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
case 38
strlen s_time_start i_tmp
if i_tmp < 1
usermsg "Start Time `"%s`"`n`nmust be 6 Numbers in length and with a :)) in between every 2 digits. or you can just press the Space Bar to leave the box blank to Auto Start the Listing program" s_time_start
sendvkey MAKE_KV(KV_SHIFT,VK_TAB)
endif
endcase
endswitch
endwhile

dlgdestroy 0 cancel

if i_evt != 14
exit
endif

if not fopen 0 s_fi_nm read
errormsg "Couldn't open file `"%s`"." s_fi_nm
else
cnt_no_fi_lines(i_ch,&l_tot_no_lin,&l_fi_sz0)

STATMSG "Waiting for the Phantom Analogue set auto start date/time program to run. Make sure that auto capture is set correctly!"

fetch txpace i_fch_tx_val
atoi s_tx_item i_tx_val
strcat s_tx_item " ms"
set txpace i_tx_val

datetimestart(s_time_start,s_date_start)
logi(s_userid)
login(s_pwd)

STATMSG "The Phantom Analogue set auto start date/time program has now started!"

ld_ovl_10(i_rg2_chc)

dialogbox 1 208 20 312 116 14 "New Phantom Analogue phones progress status bar"
text 1 10 8 200 11 s_progress left
editbox 2 10 20 190 11 s_prog_bar
text 3 10 38 300 18 s_fi_nm left
text 4 212 20 58 11 "Transmit Pace ==" left
text 6 10 60 300 34 s_sce_lin left
text 5 276 20 34 11 s_tx_item left
text 7 14 94 270 11 "Make sure that the TTY you are using to run this script file has USER = SCH only!" center
; text 8 2 104 310 11 "When using this script file ignore any SCH 0030 and 0180 error codes due to a prompt duplication." center

enddialog

l_prog_bar_op = l_fi_sz0/40

while not feof 0
fgetc 0 i_ch
if not feof 0
ftell 0 l_cur_fi_sz0
if l_cur_fi_sz0 % l_prog_bar_op == 0
strcat s_prog_bar "#"
dlgupdate 1 2
endif
if i_ch == '`r'
loopwhile
endif
if i_ch == '`n'
l_lin_cnt++
strputc s_sce_lin i_p 0
if not nullstr s_sce_lin

get_opdata(s_sce_lin)

strfmt s_progress "Line %ld of %ld" l_lin_cnt l_tot_no_lin
dlgupdate 1 1
dlgupdate 1 6
s_sce_lin = ""
i_p = 0

send_opdata()

loopwhile
endif
endif
strputc s_sce_lin i_p i_ch
i_p++
endif
endwhile


; ex_ovl_11(s_customer_item)
ex_ovl_11()

logo ()
set txpace i_fch_tx_val
fclose 0

endif

dlgdestroy 1 cancel

endproc

proc get_opdata ;#####

param string s_sce_lin

strtok s_opdata[0] s_sce_lin "," ;TYPE
strtok s_opdata[1] s_sce_lin "," ;TN
strtok s_opdata[2] s_sce_lin "," ;DES
strtok s_opdata[3] s_sce_lin "," ;Customer Number
strtok s_opdata[4] s_sce_lin "," ;DN
strtok s_opdata[5] s_sce_lin "," ;TGAR
strtok s_opdata[6] s_sce_lin "," ;NCOS
strtok s_opdata[7] s_sce_lin "," ;SCPW
strtok s_opdata[8] s_sce_lin "," ;CLS
strtok s_opdata[9] s_sce_lin "," ;CFW
strtok s_opdata[10] s_sce_lin "," ;DCFW

endproc

proc send_opdata ;##### Sequence of changes and data input

; waitfor "TYPE"
txdc (s_opdata[0])
waitfor "TN "
txdc (s_opdata[1])
waitfor "DES "
txdc (s_opdata[2])
waitfor "CUST "
txdc (s_opdata[3])
waitfor "DN "
txdc (s_opdata[4])
waitfor "TGAR "
txdc (s_opdata[5])
waitfor "NCOS "
txdc (s_opdata[6])
waitfor "SCPW "
txdc (s_opdata[7])
waitfor "CLS "
transmit "TLD FNA SFA " ; #### Applies to all phones in source file! ####
txdc (s_opdata[8])
waitfor "FTR "
transmit "CFW "
txdc (s_opdata[9])
waitfor "FTR "
transmit "DCFW "
txdc (s_opdata[10])
waitfor "FTR "
pause 1
txdc ("")
waitfor "REQ" forever

txdc ("NEW")

; else
; endif

endproc

proc cnt_no_fi_lines ;#####

param integer i_ch
param long l_tot_no_lin
param long l_fi_sz0

while not feof 0
fgetc 0 i_ch
if not feof 0
if i_ch == '`n'
l_tot_no_lin++
endif
endif
endwhile

ftell 0 l_fi_sz0
rewind 0

endproc

;proc txdt ;#####

;param string s_txs
;integer i_p = 0
;integer i_ch = -1

; strgetc s_txs i_P i_ch
; i_p++

; while i_ch != 0
; computc i_ch
; strgetc s_txs i_P i_ch
; i_P++
; endwhile

;endproc

proc txdc ;#####

param string s_txs
integer i_p = 0
integer i_ch = -1

strgetc s_txs i_P i_ch
i_p++

while i_ch != 0
computc i_ch
strgetc s_txs i_P i_ch
i_P++
endwhile

computc 13

endproc

proc ld_ovl_10 ;#####

param integer i_rg2_chc

Capture On

; In this area, enter in new prompts that have appeared when running this script using examples
; listed below. Different features & software versions will result in prompts that have not been
; spotted before.

WHEN TARGET 1 "OVL111 " CALL OVL111
WHEN TARGET 2 "OVL013 " CALL OVL013
WHEN TARGET 3 "CTYP " CALL CARR_RETURN
WHEN TARGET 4 "CDEN " CALL CARR_RETURN
WHEN TARGET 5 "WTYP " CALL WTYP_MCMO
WHEN TARGET 6 "MWUN " CALL MWUN_16
WHEN TARGET 7 "DIG " CALL CARR_RETURN
WHEN TARGET 8 "HUNT " CALL CARR_RETURN
WHEN TARGET 9 "ERL " CALL CARR_RETURN
WHEN TARGET 10 "ECL " CALL CARR_RETURN
WHEN TARGET 11 "LDN " CALL CARR_RETURN
WHEN TARGET 13 "SGRP " CALL CARR_RETURN
WHEN TARGET 14 "SFLT " CALL CARR_RETURN
WHEN TARGET 15 "CAC_MFC " CALL CARR_RETURN
WHEN TARGET 20 "LNRS " CALL CARR_RETURN
WHEN TARGET 21 "LHK " CALL CARR_RETURN
WHEN TARGET 22 "SCI " CALL CARR_RETURN
WHEN TARGET 23 "PLEV " CALL PLEV_0
WHEN TARGET 24 "RNPG " CALL CARR_RETURN
WHEN TARGET 25 "RCO " CALL CARR_RETURN
WHEN TARGET 26 "PRI " CALL CARR_RETURN
WHEN TARGET 27 "MLWU_LANG " CALL CARR_RETURN
WHEN TARGET 28 "MLNG " CALL CARR_RETURN
; WHEN TARGET 29 "DNDR " CALL CARR_RETURN
WHEN TARGET 30 " MARP ON" CALL MARP_NO
WHEN TARGET 31 " CPND " CALL CARR_RETURN
WHEN TARGET 32 " VMB " CALL CARR_RETURN

WHEN TARGET 40 "TEN " CALL CARR_RETURN
WHEN TARGET 41 "ECHG " CALL EASY_CHANGE
WHEN TARGET 42 "DATE " CALL CARR_RETURN
WHEN TARGET 43 "PAGE " CALL CARR_RETURN
WHEN TARGET 44 "NACT " CALL CARR_RETURN
WHEN TARGET 45 "ZONE " CALL ZONE_1
WHEN TARGET 48 "SCH0030 " CALL SCH0030
WHEN TARGET 49 "SCH0127 " CALL SCH0127
WHEN TARGET 50 "SCH0255 " CALL SCH0255
WHEN TARGET 51 "SCH0355 " CALL SCH0355
WHEN TARGET 52 "SCH0361 " CALL SCH0361
WHEN TARGET 53 "SCH0717 " CALL SCH0717
WHEN TARGET 54 "SCH0733 " CALL SCH0733
; WHEN TARGET 55 "SCH1447 " CALL SCH1447
WHEN TARGET 56 "SCH1510 " CALL SCH1510
WHEN TARGET 57 "SCH1893 " CALL SCH1893
WHEN TARGET 58 "SCH3058 " CALL SCH3058
WHEN TARGET 59 "SCH3127 " CALL SCH3127
WHEN TARGET 60 "SCH3129 " CALL SCH3129
WHEN TARGET 61 "SCH5199 " CALL SCH5199
WHEN TARGET 62 "SCH6396 " CALL SCH6396
WHEN TARGET 63 "SCH6711 " CALL SCH6711
; WHEN TARGET 64 "SCH3127 " CALL SCH3127
WHEN TARGET 81 "SCH8888 " CALL SCH8888
WHEN TARGET 82 "SCH8889 " CALL SCH8889


txdc ("****")
waitfor ">"

txdc ("LD 10") ; Start of access into LD 10
waitfor "REQ"
if i_rg2_chc == 3
txdc ("NEW")
else
txdc ("CHG")
endif
waitfor "TYPE"

STATMSG " Start of Progress status bar and new extensions to be provided in LD 10"

endproc

proc ex_ovl_11 ;##### Print out the sets in LD 81

;param string s_customer_item

pause 3
txdc ("")
txdc ("****")
waitfor ">"

txdc ("LD 81")
waitfor "REQ "
txdc ("LST")
waitfor "CUST "
txdc ("0")
; waitfor "DATE "
; txdc ("")
; waitfor "PAGE "
; txdc ("")
waitfor "DES "
txdc ("")
waitfor "FEAT "
txdc ("500")
waitfor "FEAT "
txdc ("")
waitfor "REQ "
txdc ("****")
waitfor ">"

Capture off

endproc

PROC DATETIMESTART

param string s_time_start
param string s_date_start
integer i_tmp

strlen s_date_start i_tmp
if i_tmp >5
strlen s_time_start i_tmp
if i_tmp <2
s_time_start = "00:10:00"
endif
endif
strlen s_time_start i_tmp
if i_tmp >5
strlen s_date_start i_tmp
if i_tmp <2
s_date_start = $DATE
endif
endif

Waituntil s_time_start s_date_start
endproc

Proc TTY_LOGIN
pause 3
txdc ("LOGI")
endproc

proc logi ;#####
param string s_userid

WHEN TARGET 0 "OVL014 " CALL OVL014
WHEN TARGET 1 "OVL428 " CALL OVL428
WHEN TARGET 2 "SCH0510 " CALL OVL014
WHEN TARGET 3 "OVL013 " CALL TTY_LOGIN
WHEN TARGET 5 "OVL111 " CALL OVL111
WHEN TARGET 6 "SCH0510 " CALL SCH0101
WHEN TARGET 7 "SCH101 " CALL SCH0101

transmit "LOGI "
; txdc ("LOGI ")
txdc (s_userid)
waitfor "PASS?"
endproc

proc login ;#####
param string s_pwd
txdc (s_pwd)
waitfor ">"
endproc

proc logo ;#####
txdc ("LOGO") ; Add on this line ";" to allow the program to remain logged in!.
F_Time=$TIME
statmsg "LD 10 New Phantom Set script file has now been Completed`n`n at %s" F_TIME

usermsg "LD 10 New Phantom Set script file is now Complete`n`n at %s" F_TIME
endproc

PROC PLEV_0
txdc ("0")
ENDPROC

PROC ZONE_1 ; ############# Change to Zone required! ############
; pause 1
txdc ("1")
ENDPROC

PROC CARR_RETURN
txdc ("")
ENDPROC

PROC WTYP_MCMO
; pause 1
txdc ("MCMO")
ENDPROC

PROC MWUN_16
; pause 1
txdc ("16")
ENDPROC

PROC EASY_CHANGE
pause 1
txdc ("NO")
ENDPROC

Proc OVL013
txdc ("****")
ENDPROC

PROC SCH0030
STATMSG "Ignore the SCH0030 and SCH0180 error codes. They appear due to a prompt duplication that I can't resolve!.!"
ENDPROC

PROC SCH0127
txdc ("****")
waitfor ">"
USERMSG "Script failed, due to the TN already exists on the system!"
exit
ENDPROC

PROC SCH0255
STATMSG "SCH0255. Illegal Hunt DN.!"
ENDPROC

PROC SCH0355
STATMSG "SCH0355. Unable to match input field with stored mnemonics. Check after script has run if the value was required!"
ENDPROC

PROC SCH0361
STATMSG "SCH0361. Key number is not valid on this set type.!"
ENDPROC

PROC SCH0717
txdc ("****")
waitfor ">"
USERMSG "Script failed, due to a missing ACD DN in LD 23!"
exit
ENDPROC

PROC SCH0733
STATMSG "SCH0733. Unable to match input field with stored mnemonics.!"
ENDPROC

PROC SCH1510
txdc ("TLD FNA SFA CFXA")
STATMSG "SCH1510. Invalid CLS input. Default CLS settings TLD FNA SFA CFXA for configuring a Phantom set are used.!"
ENDPROC

PROC SCH1893
txdc ("****")
waitfor ">"
USERMSG "Script failed. Corporate Directory not allowed for this set type!"
exit
ENDPROC

PROC SCH3058
STATMSG "SCH3058. Wrong number of input fields. Check after script has run if the value was required!"
ENDPROC

PROC SCH3127
txdc ("****")
waitfor ">"
STATMSG "Invalid AST key type. Only ACD, MCR, MCN, SCR and SCN key are supported.!"
ENDPROC

PROC SCH3129
STATMSG "This DN already has AST assigned and this TN is configured with CLS ICRD!"
ENDPROC

PROC SCH5199
txdc ("****")
waitfor ">"
USERMSG "Script failed, as an invalid internal DN has been entered for the CFW key. The entered DN is either a normal DN, or FFC+DN. The validation is done for both CFXD and CFXA classes of service.!"
exit
ENDPROC

PROC SCH6396
STATMSG "SCH6396. Warning: A Phantom TN has been configured without a CFW or DCFW DN. Check after script has run if this was correct!"
ENDPROC

PROC SCH6711
txdc ("*")
STATMSG "No trailing blanks/spaces can be entered after the CLID entry.Enter {CR} after the CLID entry!"
ENDPROC

PROC SCH8888
STATMSG "SCH8888. The Station Control Password can only use digits 0-9. Check if SCPW was needed after script file has finished!."
ENDPROC

PROC SCH8889
waitfor "SCPW "
txdc ("")
pause 1
STATMSG "SCH8889. CEPT default does not match the password length defined in LD 15. Check if SCPW was needed after script file has finished!."
ENDPROC

PROC MARP_NO
txdc ("NO")
ENDPROC

PROC OVL014
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
ENDPROC

PROC OVL111
txdc ("****")
waitfor ">"
USERMSG "Script failed, as the TTY user is NOT logged into the system!"
exit
ENDPROC

PROC OVL428
txdc ("****")
USERMSG "Script failed. The Login name & password combination is invalid. Check the password & login name & try again.! On software versions V04.5x onwards, check if the password uses case SeNSiTivItY!"
exit
ENDPROC

PROC SCH0101
pause 2
transmit "****^M"
waitfor ">"
STATMSG "Please wait 30 seconds as the TTY is already logged in!"
ENDPROC


; The information listed below has been taken from the "vkeys.inc" file.
; I have added in one ";" against each line for use with this file!.
; Should your copy of "vkeys.inc" be missing or damaged, then you can copy this
; section listed below with one of the ";" removed for each line!.

;;Definitions of standard virtual key code values
;;**********************************************************************
;;* VKEYS.INC
;;* Copyright (c) 1999 Symantec Corporation
;;*
;;* Definitions of standard virtual key code values. Use these macro
;;* definitions in your ASPECT script files rather than hard-coded
;;* constants to improve maintainability and readability. For more
;;* information, see the keyval and vkey conventions described in the
;;* Windows ASPECT Script Language reference manual.
;;**********************************************************************

;#ifndef _INC_VKEYS ; if file not already included
;#define _INC_VKEYS ; prevent further inclusion

;;**********************************************************************
;;* Macro definitions of standard virtual key code values
;;**********************************************************************

;#define VK_LBUTTON 0x01 ; Left mouse button
;#define VK_RBUTTON 0x02 ; Right mouse button
;#define VK_CANCEL 0x03 ; Ctrl-Break
;#define VK_MBUTTON 0x04 ; Middle mouse button
;; 0x05-0x07 ; Undefined
;#define VK_BACK 0x08 ; Backspace key
;#define VK_TAB 0x09 ; Tab key
;; 0x0A-0x0B ; Undefined
;#define VK_CLEAR 0x0C ; Clear key or Keypad 5 with Num lock off
;#define VK_RETURN 0x0D ; Enter or Return key
;; 0x0E-0x0F ; Undefined
;#define VK_SHIFT 0x10 ; Shift key
;#define VK_CONTROL 0x11 ; Control or Ctrl key
;#define VK_MENU 0x12 ; Menu or Alt key
;#define VK_PAUSE 0x13 ; Pause key
;#define VK_CAPITAL 0x14 ; Capital or Caps Lock key
;; 0x15-0x19 ; Reserved for Kanji Systems
;; 0x1A ; Undefined
;#define VK_ESCAPE 0x1B ; Esc or Escape key
;; 0x1C-0x1F ; Reserved for Kanji Systems
;#define VK_SPACE 0x20 ; Spacebar
;#define VK_PRIOR 0x21 ; Page Up key
;#define VK_NEXT 0x22 ; Page Down key
;#define VK_END 0x23 ; End key
;#define VK_HOME 0x24 ; Home key
;#define VK_LEFT 0x25 ; Left arrow key
;#define VK_UP 0x26 ; Up Arrow key
;#define VK_RIGHT 0
 
Thank you firebirdscrambler for all that put you can upload the Script file on the Internet ,and if you have new,chg 2616 script


 
script file=> file.was
(for ex. upload file to rapidshre.com )
 
Just copy Firebird's scripts TEXT and paste it into new Script. You don't need the actual .WAS file
 
You might have to tweak the script to match your PBX. it will give you a good chance to learn the basics of scripting yourself. There is also an apsect scripting forum on tek-tips.

JohnThePhoneGuy

"If I can't fix it, it's not broke!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top