thattekguy
Vendor
First off, I never used a script before so if anyone responds please be as detailed as possible. I need to change the length of authcodes from 10 to 14 digits in a meridian pbx. I have a script that was used on another site for this. I have no idea what to do with my excel sheet with the new authcodes on them. Do I need to save it somewhere on my pc and then change the fopen line in the script to point to the file with the new codes? The script I was given is below, and under that is an example of the new auth codes going in. I need to know how to go to this site, sit down in front of the pbx and get this to work correctly from opening procomm to running the script, so any help would be greatly appreciated. I did read up on this, I even read thru the procomm help files but I am not feeling a warm and fuzzy inside about doing this.Thank you.
string info
proc main
fopen 0 "D:\Program Files\Procomm Plus\Capture\aut.txt" read text
transmit "new^M"
waitfor "TYPE "
transmit "aut^M"
waitfor "CUST "
transmit "0^M"
waitfor "SPWD "
transmit "0000^M"
waitfor "CODE "
read_next:
fgets 0 info
if feof 0
exit
endif
; strdelete info 5 2 ;Optional if txt file
transmit info
transmit "^M"
waitfor "CODE " 1
if success
goto read_next
endif
transmit "^M"
waitfor "CLAS "
transmit "0^M" ;or whatever
waitfor "CODE "
transmit info
transmit "^M"
waitfor "SARC "
transmit "^M"
waitfor "CLAS "
transmit "0^M"
waitfor "CODE "
goto read_next
endproc
00100040000062
00100040000075
00100040000098
string info
proc main
fopen 0 "D:\Program Files\Procomm Plus\Capture\aut.txt" read text
transmit "new^M"
waitfor "TYPE "
transmit "aut^M"
waitfor "CUST "
transmit "0^M"
waitfor "SPWD "
transmit "0000^M"
waitfor "CODE "
read_next:
fgets 0 info
if feof 0
exit
endif
; strdelete info 5 2 ;Optional if txt file
transmit info
transmit "^M"
waitfor "CODE " 1
if success
goto read_next
endif
transmit "^M"
waitfor "CLAS "
transmit "0^M" ;or whatever
waitfor "CODE "
transmit info
transmit "^M"
waitfor "SARC "
transmit "^M"
waitfor "CLAS "
transmit "0^M"
waitfor "CODE "
goto read_next
endproc
00100040000062
00100040000075
00100040000098