Script to Capture and Auto-name a file each hour - PBX Info :: Your Free PBX, PABX and Telephone Information Resource
Home | Register |    
 
Forums         |        Articles          |        Blogs         |      Software          |      Portals          |      Resource          |      Wiki      |    White Papers         
 
Go Back   PBX Info :: Your Free PBX, PABX and Telephone Information Resource > PBX SYSTEMS > NORTEL > Meridian Systems
   SEARCH  
     
User Name Password      
Save ?
Meridian Systems Welcome to the Nortel Meridian Forums Including Meridian Options 11-81C CS1000M Meridian Mail Call Pilot Companion and Sucession Hospitality OTM MAT MICB RAN NetGateway ..., and all other Applications

Tags: , , , , ,


Reply
 
LinkBack Thread Tools Display Modes
Old 08-21-2003, 12:24 PM   #1 (permalink)
Chas2002
Admin
 
Chas2002's Avatar
Chas2002 is scared by papa-bear\'s "not work safe"

Activity Longevity
2/20 19/20
Today Posts
0/0 sssss1682
Location: Gulf Coast
Rep Power: 5Chas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond repute
Country:
Option 61 and Shoreline

I posted this earlier - but have noticed that this system adds items to lines that will create compile errors - So do not paste the info below into your script editor. Visit this site and copy http://www.angelfire.com/alt2/pbxinsight/Script

If you do wish to copy and paste from this board - you will need to remove
Quote:
< b >
info found at the end of each
Quote:
******
line. Also be sure to place a semicolon ";" in front of *Defines the Macro*

*************** Original Message***************


Hi All,
I've had several request to post a procomm plus script that automatically captures and names a file...I'll try to be as thorough as possible - but if I miss anything - send me an email. sprinttech@beaurivage.com

Software Needed
Win 9x OS
Procomm Plus 8x
Windows Task Scheduler

Hardware Needed
Perfered - A standalone PC direct connected to a TTY port on the switch.

Programming and Setup

Switch

1. Program the ADAN/TTY Port for the appropriate USER prompt in LD 17.

Task Scheduler

2. Setup a new Scheduled Task in your Windows Task Scheduler...
2a. Open Tasck Scheduler
2b. Double Click new task [the wizard will activate]
2c. Navigate to the Symantec Folder and find pw5.exe
2d. Select Daily for Type of Task
2e. Continue to select daily events
2f. Open advanced when Finishing
2g. Under the Schedule Tab, select Adavanced
2h. Checkmark Repeat
2i. Enter Repeate every 60 minutes for 9999 hours.

Procomm Plus

1. Open Procomm Plus
2. Under Tools - Select Scripts
3. Under Scripts - Select Compile/Edit
4. Highlight statup.was
5. Open EDIT
6. Delete the current info in the Script Editor Screen
7. Paste the info below into the Script Editor Screen. Note your first line in the screen should be #comment. Your last line should be endproc.
9. Click Tools - and Select Compile
10. Once compile successfully - Click Ok.
11. Close Procomm Plus
12. Reopen - the sytem should open Procomm, the directory, and start capturing the file.


NOTES

Some of the problems I've had in the past.

A. Setup your scheduler to open Procomm Plus a couple minutes prior to the Switch sending the report.
B. Keep an eye on your Switch Time compared to your PC Time.

I personally don't use this script anymore. I've programmed an MS Access Program that captures everything my switch sends each hour, parses the info, and gives me printable reports. No human intervention is requred See: www.angelfire.com/alt2/pbxinsight






Quote:
#comment
~~~ Automation Script for Meridian Procomm Plus Capture Files V2.2 ~~~

Purpose: To replace okidata printers with a PC connected to a TTY
Port to capture ACD or Traffic reports.

This aspect script will open the first Data Connection Directory in
Procomm Plus and assign the MMDDYYYY value to captured files. It
automatically checks to see if a file exist for the date value - if so,
it adds 1 to the file extension.

Thus, if the Procomm Plus program captures 24 files on the same day, the
capture directory will have; example: 01012003.cap and 01012003.001 through
01012003.023

Author: Chas
Date Updated: 6-25-2003
Tested: Win 98, Win NT 4.0 with Service Pack 5

Quick Install Instructions ------------------------------
1. Navigate to Procomm Plus and rename current startup.was to
oldstartup.was
2. Paste this startup.was script into the same directory.

Disclamer: Nortel and Meridian are Trademarks of Nortel Networks. There are no
waranties implied - use this program at your own risk. The program has been tested by Charles XXXXX and has not in any way interferred with other PC operations..
All intellectual rights are reserved.
#endcomment


;************************************************* ************************< br /> ;* Defines the Macro *
;************************************************* ************************< br />
#DEFINE CaptureMode 0 ;sets the mode of the Capture file to Screen


;************************************************* ************************< br /> ;* Sets Global Variables *
;************************************************* ************************< br />
string FileName = $NULLSTR ;holds the filename to name capture file


;************************************************* ************************< br /> ;* *
;* -------------------1st Procedure or MAIN------------------------------*
;* This procedure calls GetFileNam to generate the Date. *
;* Then calls CheckForFile to see Filenam already exist. *
;* StartCapture starts the Capture file. *
;* *
;* Globals: NONE *
;* Calls: GETFILENAM, CHECKFORFILE, STARTCAPTURE, *
;************************************************* ************************< br />

proc Main

GetFileNam() ;calls the GetFileName proc
CheckForFile() ;calls the CheckForFile proc
StartCapture()


Endproc


;************************************************* ************************< br /> ;* *
;* GETFILENAM() *
;* The procedure GetFileName gets the system date and removes any illegal*
;* characters from the FileName *
;* *
;* Globals: FILENAME *
;* Calls: NONE *
;* Called by: Main *
;* *
;************************************************* ************************< br />
proc GetFileNam

integer Position = 1

FileName = $DATE ;sets the name from Control Panel
while (Position != 0)
strfind FileName "/" Position ;searches for / (illegal character)
if failure ;tests for a failure
Position = 0 ;sets condition to False
else ;successful search
strdelete FileName Position 1 ;removes illegal character
endif
endwhile
while (Position != 0)
strfind FileName "-" Position ;searches for -(illegal character)
if failure ;tests for a failure
Position = 0 ;sets condition to False
else
strdelete FileName Position 1 ;removes illegal character
endif
endwhile
strcat FileName ".CAP"
endproc


;************************************************* ************************< br /> ;* *
;* CHECKFORFILE() *
;* The procedure CheckForFile looks for conflicts in filename structure. *
;* If a conflict exist it moves to Autoname procedure. *
;* If the Filename does not exist it moves back to MAIN. *
;* *
;* Globals: FILENAME *
;* Calls: FILEEXISTS *
;* Called by: Main *
;* *
;************************************************* ************************< br />
proc CheckForFile

string CapturePath

fetch capture path CapturePath ;gets the current capture path
strcat CapturePath "" ;put a on the end of path
strcat CapturePath Filename ;put filename on the path
if isfile CapturePath ;check to see if file is in DIR
AutoName()
else
set capture overwrite OFF ;sets the capture to append
set capture file FileName ;sets the capture filename
set capture recordmode CaptureMode ;sets the mode
endif
endproc



;************************************************* ************************< br /> ;* *
;* AUTONAME() *
;* The procedure AutoName names a file for you with a numbered extension *
;* this will be used if the date of the file is duplicated. *
;* *
;* Globals: FILENAME *
;* Calls: NONE *
;* Called by: CheckForFile *
;* *
;************************************************* ************************< br />
proc AutoName

string TargetStr = ".CAP"
string ReplaceStr = ".001"
string CapPath
float ReplaceFloat

while 1 ;loop until find a name
strreplace FileName TargetStr ReplaceStr
fetch capture path CapPath ;gets the current capture path
strcat CapPath "" ;put a on the end of path
strcat CapPath FileName ;put filename on the path
isfile CapPath ;is file in capture path
if failure ;no
fetch capture path CapPath ;gets the current cap path
set capture file FileName ;sets the capture filename
set capture recordmode CaptureMode ;sets the mode
exitwhile ;exits the loop
else ;yes
TargetStr = ReplaceStr ;sets new target string
atof ReplaceStr ReplaceFloat ;change to an integer
;usermsg "float value after atof %0.3f" ReplaceFloat
ReplaceFloat = ReplaceFloat + .001 ;increases integer by .001
strfmt ReplaceStr "%0.3f" ReplaceFloat ;formats string
strdelete ReplaceStr 0 1 ;deletes begining zero
endif
endwhile
endproc


;************************************************* ************************< br /> ;* *
;* STARTCAPTURE() *
;* The procedure StartCapture starts the Capture file and waits for the *
;* when command to fire in the Main procedure. *
;* *
;* Globals: NONE *
;* Calls: NONE *
;* Called by: Main *
;* *
;* NOTE: Pause 20 will keep the Procomm Plus program open for 410 *
;* seconds (Approx 7 Minutes). You may have to change this timer *
;* to suit your particulare needs *
;************************************************* ************************< br />
proc StartCapture


winactivate $PWMAINWIN ; Make sure Procomm Plus has focus.
mspause 750
sendkey ALT 'D' ; Send ALT-D to open Connection Directory.
mspause 500 ; Pause to wait for menu.
Sendkey ALT 'C' ; Send ALT-C to open Connection.
mspause 500 ; Pause to show of playback selection.
sendkey 'C' ; Send C .
mspause 750

capture on ; Open up the capture file.


pause 20 ; Pause for 410 seconds.

capture off ; Close the capture file.

mspause 500 ; Pause to wait for closure

pwexit ; Close Procomm Plus

endproc
[Edited on 21/8/2003 by Chas2002]

[Edited on 21/8/2003 by Chas2002]

[Edited on 21/8/2003 by Chas2002]

[Edited on 21/8/2003 by Chas2002]

[Edited on 21/8/2003 by Chas2002]
__________________
Free Preview of my fictional book: Chaos Theorem .:-:. Employment: Find a new job on pbxjobs.com

Best Video Jukebox on the net (mini-flash widget) | and | Do you want to store your MP3 files? visit: Musecast.com

Why not start a blog http://www.pbxinfo.com/blog.php - it's 110% free.
Chas2002 is offline   sendpm.gif Reply With Quote
Old 08-21-2003, 04:16 PM   #2 (permalink)
rhack
Junior Member

Activity Longevity
1/20 20/20
Today Posts
0/0 ssssss175
Location: Chlt-NC
Rep Power: 7rhack is on a distinguished road
Country:
internal cdr

Cool Script. The PBXInsight application you created looks excellent. Looks like you put alot of time and effort into it. Are you going to be selling the app soon, or are you still developing it? Looks like something alot of people could use.
rhack is offline   sendpm.gif Reply With Quote
Old 08-21-2003, 05:19 PM   #3 (permalink)
Chas2002
Admin
 
Chas2002's Avatar
Chas2002 is scared by papa-bear\'s "not work safe"

Activity Longevity
2/20 19/20
Today Posts
0/0 sssss1682
Location: Gulf Coast
Rep Power: 5Chas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond reputeChas2002 has a reputation beyond repute
Country:
Script to Capture and Auto-name a file each hour

Rhack -

Thanks for the reply. Yes - I'm still developing the application in Access 97, then I'll need to covert and program for Access 2K. I've been testing it on my switch since March and had a few bugs to work out, but it's worked fine the last 2 months and has collected 1350 records/reports without error..........

Have you ever marketed a program? - This is the first one that I've done for the sole purpose of making a little cash. I've done a couple of small ones as personal favors and one for the Post Office at Okinawa AB, Japan.

Any suggestions about marketing - promotion - cost of the app would be greatly appreciated.

Thanks
__________________
Free Preview of my fictional book: Chaos Theorem .:-:. Employment: Find a new job on pbxjobs.com

Best Video Jukebox on the net (mini-flash widget) | and | Do you want to store your MP3 files? visit: Musecast.com

Why not start a blog http://www.pbxinfo.com/blog.php - it's 110% free.
Chas2002 is offline   sendpm.gif Reply With Quote
Old 08-21-2003, 06:15 PM   #4 (permalink)
rhack
Junior Member

Activity Longevity
1/20 20/20
Today Posts
0/0 ssssss175
Location: Chlt-NC
Rep Power: 7rhack is on a distinguished road
Country:
Keycodes in OTM

Wish I had some advice about marketing the program. I think by building up your web site and maybe throwing a few bucks for a spot on this site may do you some good. One thing I would suggest is to create a very limited implementation of the app and distribute an usupported freeware version, requesting that users return any bug information to you. This way, you will have a variety of users running different versions of software, on different PBX's. This will help in developing a solid product. Once the person trialing the sw gets accustomed to it, they could upgrade to a full version. Do things like limiting the reports, storage duration etc.

I have a couple of apps I would like to polish up and get out there, just haven't had the time to work on them. I wrote a dirty little parser that takes a captured traffic file and provides a delimited output of TFC002, System Console and Individual Console measurements. I then have an Access DB that imports and provides some nice reports. During the parsing I calculate trunk usage and capacity, also average some of the attendant data and put it into a more readable output.

I need to get to the point where I get away from Access and incorporate into the VB app. I also want to add number of trunks required calculations. Also, incorprate a mechanism for logging into remote PBX's and doing a VHST ofn the traffic, and download the data for processing.

I've also did a traffic program for the SL100 (like a DMS100). I've got ION Networks Sentinels that capture the traffic output, like a PC com port would. Each nite at midnight. the files close and rotate, the traffic file is then ftp'd to a PC I have set up as an ftp server. The techs come in point and click a couple of times and they have the traffic for both SL100's in a few minutes.

Again, I want to automate as much as possible. I would like to set up a web app with some ASP and allow users to pull reports from the web. Maybe post daily or some other timeframes worth of data as static html as well.

Someday I'll get time. Better yet, I moved to a location with a bunch of web and DB developers. I need to put together a good project plan and definition and post a help wanted sign for after hours work. I don't want to develop on company time, and have the finished product become someone elses property.

Good luck and good work!
rhack is offline   sendpm.gif Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 04:30 AM.

Tags   |   Advertise    |    Media Partners   |    Admin   |   About us   |   Contact Us   |   RSS   

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.0.0
Copyright PBXINFO LLC 2006