home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / EASL2PRF.ZIP / LOGPROFS.INC < prev    next >
Text File  |  1990-04-27  |  2KB  |  60 lines

  1. string TermID TermPrefix LogMode LoggedViaMe is "N"
  2.  
  3. action LogonToPROFS is 
  4.     action Init3270
  5.     add invisible textual region PROFSWindow
  6.         window size 80 columns 24 lines at 10 10 in PrimaryWindow
  7.     copy "PROFSWindow" to TextRegionName
  8.     action ReadScreen
  9.     find in TextRegionName from 1 1 "THE PROGRESSIVE COMPANIES"
  10.     if (not found) then 
  11.        # error message
  12.           copy "I could not find the screen 'THE PROGRESSIVE COMPANIES'\nSwitch to the emulator, correct the problem, and try again" to DocMsg
  13.           copy ReplyToMessage(" ",DocMsg,MessageOK,1,MessageIconExclamation) to TempX
  14.      else             # on the main menu
  15.         extract from textual line ycursor of TextRegionName from TextRegionName
  16.            skip by "TERMID = "
  17.            take word TermID
  18.         extract from TermID
  19.            take 2 TermPrefix
  20.         if (TermPrefix = "LN") then
  21.             copy "M2BSCQ" to LogMode
  22.         else 
  23.             copy "MSDLCQ" to LogMode
  24.         end if
  25.         # now start logon sequence
  26.         copy "HI '" UserID " " PassWord "'," LogMode to Keystrokes
  27.         action EnterString
  28.         action DefineWatch
  29.            copy "EPQP00" to WatchChar
  30.            copy 1 to WatchRow     
  31.            copy 2 to WatchCol
  32.            copy 80 to SettleTime
  33.            action WatchForNoX
  34.            action WatchForChar
  35.        action WatchAndWait
  36.        if (WatchGaveUp) then
  37.            # error message
  38.           copy "The Logon to PROFS Failed\nSwitch to the emulator, get to the screen 'THE PROGRESSIVE COMPANIES' and try again" to DocMsg
  39.           copy ReplyToMessage(" ",DocMsg,MessageOK,1,MessageIconExclamation) to TempX
  40.        else
  41. #         enable item Logoff from PrimaryWindowABCUA
  42. #         disable item Logon from PrimaryWindowABCUA
  43. #         check item Logon from PrimaryWindowABCUA
  44.             copy "Y" to LoggedViaMe            # indicate user logged on via easel
  45.        end if 
  46.     end if
  47.     action Stop3270
  48.  
  49. action LogOffPROFS is 
  50.     action Init3270
  51.     copy "BYE" to Keystrokes
  52.     action EnterString
  53. #   disable item Logoff from PrimaryWindowABCUA
  54. #   enable item Logon from PrimaryWindowABCUA
  55. #   uncheck item Logon from PrimaryWindowABCUA
  56.      copy "N" to LoggedViaMe            # indicate user logged on via easel
  57.      action Stop3270
  58.  
  59.            
  60.