home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / pibterm / pibt41e3.zip / PCBPASS.SCR < prev    next >
Text File  |  1988-02-26  |  5KB  |  128 lines

  1. *
  2.    Declare  SysName     String
  3.    Declare  PassWord    String
  4.    Declare  DialEnt     Integer
  5.    Declare  StrIdx      Integer
  6.    Declare  TimeOut     Integer  10
  7.    Declare  LoopCount   Integer   0
  8.    Declare  CaptStatus  String  'OFF'
  9. *
  10. ******************************************************************************
  11. *                                                                            *
  12. *   Script:     PCBOARD.SCR                                                  *
  13. *                                                                            *
  14. *   Purpose:    Automated logon for PCBoard bulletin board systems.          *
  15. *                                                                            *
  16. *   Invocation: This script is meant to be invoked from the dialing          *
  17. *               directory.                                                   *
  18. *                                                                            *
  19. *   Remarks:    Creates a file called PCB_NEWS.TXT that will contain the     *
  20. *               first screenful of News displayed by the system (if any).    *
  21. *                                                                            *
  22. *               This script calls the GETPASS script to return the name      *
  23. *               of the system being accessed plus the password for that      *
  24. *               system.                                                      *
  25. *                                                                            *
  26. ******************************************************************************
  27. *
  28. *                                  Get entry number of system dialed
  29.    Set DialEnt = Dialed
  30. *                                  Wait for the "graphics" prompt
  31. *
  32.    WaitString '=no?' TimeOut
  33.    If (WaitFound) then
  34. *                                  Use graphics for this call
  35.       SText 'Y Q|'
  36.  
  37. *                                  Get name of system + password from Mypass.Dat file
  38. *
  39.       Execute 'getpass' DialEnt SysName PassWord
  40. *
  41. *                                  Format Password for use by combining
  42. *                                  with logon id (i.e., first & last name)
  43. *
  44.       Set PassWord = CONCAT('FirstName LastName ', PassWord)
  45.       Set PassWord = CONCAT( PassWord , '|' )
  46. *
  47. *                                  Format System Name for log file entry
  48. *
  49.       Set SysName  = CONCAT('Captured News Items for ', SysName)
  50. *
  51. *                                  Turn on capture in case there's news.
  52. *                                  Replace with your own file name.
  53. *
  54.       Capture 'C:\pcbdir\PCB_News.Txt' 'E'
  55. *
  56. *                                  Set capture file status flag to
  57. *                                  indicate an open log file
  58. *
  59.       Set CaptStatus = 'ON'
  60. *
  61. *                                  Write system name to log file
  62. *
  63.       WriteLog '========================================================'
  64.       WriteLog SysName
  65.       WriteLog '========================================================'
  66.  
  67. *                                  Send logon id and password
  68.       SText PassWord
  69.  
  70. *                                  Set WaitTime to one second
  71.       WaitTime 1
  72. *                                  Loop until we get to main command prompt
  73.       Repeat
  74.          WaitList StrIdx 'continue?' '=no?' '(NS)?' '=yes?' 'Command?'
  75.          Set LoopCount = LoopCount + 1
  76.          DoCase StrIdx
  77.             Case 1
  78. *                                  Answer the "Press (Enter) to continue?"
  79. *                                  prompt
  80.                SText '|'
  81. *                                  And re-initialize our "dead-man"
  82. *                                  loop counter
  83. *
  84.                Set LoopCount = 0
  85.             EndCase
  86.             Case 2
  87. *                                  Conference "auto-joined" ...
  88. *                                  Answer the "view others" prompt
  89.                SText '|'
  90. *                                  And re-initialize our "dead-man"
  91. *                                  loop counter
  92. *
  93.                Set LoopCount = 0
  94.             EndCase
  95.             Case 3
  96. *                                  Answer the "More: (Y), (N), (NS)?"
  97. *                                  prompt
  98.                SText 'N|'
  99. *                                               And re-initialize our "dead-man" 
  100. *                                               loop counter
  101. *
  102.                Set LoopCount = 0
  103.             EndCase
  104.             Case 4
  105. *                                  Turn off capture and scan all
  106. *                                  message bases for mail
  107. *
  108.                If ( CaptStatus = 'ON' ) Then
  109.                   Capture
  110.                   Set CaptStatus = 'OFF'
  111.                EndIf
  112.                SText 'A NS|'
  113.                Set LoopCount = 0
  114.             EndCase
  115.          EndDoCase
  116.       Until (StrIdx = 5) or (LoopCount = TimeOut)
  117.  
  118.    EndIf
  119. *
  120. *                                  If the capture file is still on (?),
  121. *                                  then turn it off
  122. *
  123.    If ( CaptStatus = 'ON' ) Then
  124.       Capture
  125.    EndIf
  126. *                                  That's all folks!
  127.  
  128.