home *** CD-ROM | disk | FTP | other *** search
- *
- Declare SysName String
- Declare PassWord String
- Declare DialEnt Integer
- Declare StrIdx Integer
- Declare TimeOut Integer 10
- Declare LoopCount Integer 0
- Declare CaptStatus String 'OFF'
- *
- ******************************************************************************
- * *
- * Script: PCBOARD.SCR *
- * *
- * Purpose: Automated logon for PCBoard bulletin board systems. *
- * *
- * Invocation: This script is meant to be invoked from the dialing *
- * directory. *
- * *
- * Remarks: Creates a file called PCB_NEWS.TXT that will contain the *
- * first screenful of News displayed by the system (if any). *
- * *
- * This script calls the GETPASS script to return the name *
- * of the system being accessed plus the password for that *
- * system. *
- * *
- ******************************************************************************
- *
- * Get entry number of system dialed
- Set DialEnt = Dialed
- * Wait for the "graphics" prompt
- *
- WaitString '=no?' TimeOut
- If (WaitFound) then
- * Use graphics for this call
- SText 'Y Q|'
-
- * Get name of system + password from Mypass.Dat file
- *
- Execute 'getpass' DialEnt SysName PassWord
- *
- * Format Password for use by combining
- * with logon id (i.e., first & last name)
- *
- Set PassWord = CONCAT('FirstName LastName ', PassWord)
- Set PassWord = CONCAT( PassWord , '|' )
- *
- * Format System Name for log file entry
- *
- Set SysName = CONCAT('Captured News Items for ', SysName)
- *
- * Turn on capture in case there's news.
- * Replace with your own file name.
- *
- Capture 'C:\pcbdir\PCB_News.Txt' 'E'
- *
- * Set capture file status flag to
- * indicate an open log file
- *
- Set CaptStatus = 'ON'
- *
- * Write system name to log file
- *
- WriteLog '========================================================'
- WriteLog SysName
- WriteLog '========================================================'
-
- * Send logon id and password
- SText PassWord
-
- * Set WaitTime to one second
- WaitTime 1
- * Loop until we get to main command prompt
- Repeat
- WaitList StrIdx 'continue?' '=no?' '(NS)?' '=yes?' 'Command?'
- Set LoopCount = LoopCount + 1
- DoCase StrIdx
- Case 1
- * Answer the "Press (Enter) to continue?"
- * prompt
- SText '|'
- * And re-initialize our "dead-man"
- * loop counter
- *
- Set LoopCount = 0
- EndCase
- Case 2
- * Conference "auto-joined" ...
- * Answer the "view others" prompt
- SText '|'
- * And re-initialize our "dead-man"
- * loop counter
- *
- Set LoopCount = 0
- EndCase
- Case 3
- * Answer the "More: (Y), (N), (NS)?"
- * prompt
- SText 'N|'
- * And re-initialize our "dead-man"
- * loop counter
- *
- Set LoopCount = 0
- EndCase
- Case 4
- * Turn off capture and scan all
- * message bases for mail
- *
- If ( CaptStatus = 'ON' ) Then
- Capture
- Set CaptStatus = 'OFF'
- EndIf
- SText 'A NS|'
- Set LoopCount = 0
- EndCase
- EndDoCase
- Until (StrIdx = 5) or (LoopCount = TimeOut)
-
- EndIf
- *
- * If the capture file is still on (?),
- * then turn it off
- *
- If ( CaptStatus = 'ON' ) Then
- Capture
- EndIf
- * That's all folks!
-