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

Need help using a procomm script..

Status
Not open for further replies.

thattekguy

Vendor
Feb 2, 2007
432
US
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
 
Thanks but this stuff might as well be written in chinese..I could have manually typed these changes in 5 times over already, all the time I spent trying to figure out the scripting sh**. I'm throwing in the towel on scripts.
 
I thought the same thing when I first used scripts, but honestly the time you spend learning them and tweaking, you will save lots of time later on, especially if you have big changes, or multiple builds.

JohnThePhoneGuy

"If I can't fix it, it's not broke!
 
Firebird is pretty exotic when he sets up his scripts, so I can see where his was overwhelming. I agree with John and wouldn't abandon scripting so fast. I suggest going to ghtrout.com and looking at some of his basic scripting samples, or use the record function and build a phone, then look at the script the recorder built and you can understand the commands a bit easier... Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top