;FCC.WAS Ver 1.00 Automated program for obtaining FCC modem information. ;****************************************************************************** ;* * ;* FCC.WAS * ;* Copyright (C) 1995 Datastorm Technologies, Inc. * ;* All rights reserverd. * ;* Author: Mike Vandelicht * ;* * ;* Purpose: A script for calling up the FCC, capturing modem manufacturer * ;* information, and saving it to file. To run this script, you must create * ;* an entry in the Dialing Directory "FCC" with a number of 301.725.1072. * ;* "FCC" must be capitalized. * ;* * ;* Note: Prior to executing this script, you will need to locate the the * ;* first 3 characters of your modem's FCC ID# (located on the back of the * ;* modem). An example would be "DK4". * ;* * ;* This Windows ASPECT SCRIPT is intended only as a sample of ASPECT * ;* programming. DATASTORM makes no warranty of any kind, express or implied, * ;* including without limitation, any warranties of merchantability and/or * ;* fitness for a particular purpose. Use of this program is at your own * ;* risk. * ;* * ;****************************************************************************** ;****************************************************************************** ;* * ;* MAIN * ;* The main procedure calls EventCheck to determine what dialog events have * ;* occurred, and what to do about them. * ;* * ;* Globals: None * ;* Calls: PrimaryDialog, EventCheck * ;* * ;****************************************************************************** proc main PrimaryDialog() when DIALOG 0 call EventCheck ;If anything happens to dialog while 1 ;Wait for something to happen yield ;Release the time-slice... endwhile endproc ;****************************************************************************** ;* * ;* PRIMARYDIALOG * ;* The procedure PrimaryDialog displays the primary dialog for the FCC * ;* script. * ;* * ;* Globals: None * ;* Calls: None * ;* Called by: Main, EventCheck * ;* * ;****************************************************************************** proc PrimaryDialog dialogbox 0 127 139 198 86 2 "Federal Communications Commission Script" pushbutton 1 75 14 40 14 "Dial FCC" pushbutton 2 19 14 40 14 "Directory" pushbutton 3 132 14 40 14 "Cancel" text 4 6 38 184 37 "First, add the Dialing Directory entry of FCC, DATA number 301.725.1072, and click OK" left enddialog endproc ;****************************************************************************** ;* * ;* EVENTCHECK() * ;* The procedure EventCheck determines what happened in the dialog, and what * ;* to do about it. * ;* * ;* Globals: None * ;* Calls: DialFCC, PrimaryDialog * ;* Called by: Main * ;* * ;****************************************************************************** proc EventCheck integer MainEvent;, AllPresent dlgevent 0 MainEvent ;See what happened switch MainEvent ;Decide what to do case 1 ;User pressed Dial button dlgdestroy 0 OK ;Remove the dialog box DialFCC() ;Do what the user asked exit ;Exit the script PrimaryDialog() ;send them back beep ;and tell them what happened statmsg "A required field is blank." endcase case 2 ;User pressed Directory button termkey ALT 'D' ;Open Directory mspause 250 ;Wait on the PW2 menu. endcase case 3 ;User pressed Cancel button dlgdestroy 0 CANCEL ;Remove the dialog box exit ;Exit the script default dlgupdate 0 0 100 ;Update any changes to dialog endcase endswitch endproc ;****************************************************************************** ;* * ;* DIALFCC() * ;* The procedure DialFCC will call the selected number, capture the modem * ;* manufacturer information to file, and logoff. * ;* * ;* Globals: None * ;* Calls: None * ;* Called by: EventCheck * ;* * ;****************************************************************************** proc DialFCC string szFname string szName="FCC.CAP" string Name dial DATA "FCC" ;Dial the Entry "FCC" waitfor ":" ;Wait for a semi-colon transmit "^M" ;Carriage return waitfor ":" ;Wait for a semi-colon transmit "^M" ;Carriage return transmit "1^M" ;Menu choice "1" waitfor ":" ;Wait for a semi-colon transmit "2^M" ;Menu choice "2" usermsg "Find on your modem, the first 3 characters of it's FCC ID" RESUME sdlginput "Please enter the 3 character FCC ID" "FCC #:" Name transmit Name ;Transmit the ID name transmit "^M" ;Carriage return set capture file szName ;Set name of capture file capture on ;Open up the capture file pause 2 transmit "^M" ;Carriage return capture off ;Close capture file waitfor ":" ;Wait for a semi-colon transmit "^M" ;Carriage return waitfor ":" ;Wait for a semi-colon transmit "0^M" ;Menu choice "0" waitfor ":" ;Wait for a semi-colon transmit "0^M" ;Menu choice "0" transmit "~~~+++~~~ATH0^M" ;Modem hang up if dir "c:\prowin2\capture\fcc.cap" szFname ;Specify directory of the file fileview szFname ;View the capture file endif endproc