home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
EASL2PRF.ZIP
/
LOGPROFS.INC
< prev
next >
Wrap
Text File
|
1990-04-27
|
2KB
|
60 lines
string TermID TermPrefix LogMode LoggedViaMe is "N"
action LogonToPROFS is
action Init3270
add invisible textual region PROFSWindow
window size 80 columns 24 lines at 10 10 in PrimaryWindow
copy "PROFSWindow" to TextRegionName
action ReadScreen
find in TextRegionName from 1 1 "THE PROGRESSIVE COMPANIES"
if (not found) then
# error message
copy "I could not find the screen 'THE PROGRESSIVE COMPANIES'\nSwitch to the emulator, correct the problem, and try again" to DocMsg
copy ReplyToMessage(" ",DocMsg,MessageOK,1,MessageIconExclamation) to TempX
else # on the main menu
extract from textual line ycursor of TextRegionName from TextRegionName
skip by "TERMID = "
take word TermID
extract from TermID
take 2 TermPrefix
if (TermPrefix = "LN") then
copy "M2BSCQ" to LogMode
else
copy "MSDLCQ" to LogMode
end if
# now start logon sequence
copy "HI '" UserID " " PassWord "'," LogMode to Keystrokes
action EnterString
action DefineWatch
copy "EPQP00" to WatchChar
copy 1 to WatchRow
copy 2 to WatchCol
copy 80 to SettleTime
action WatchForNoX
action WatchForChar
action WatchAndWait
if (WatchGaveUp) then
# error message
copy "The Logon to PROFS Failed\nSwitch to the emulator, get to the screen 'THE PROGRESSIVE COMPANIES' and try again" to DocMsg
copy ReplyToMessage(" ",DocMsg,MessageOK,1,MessageIconExclamation) to TempX
else
# enable item Logoff from PrimaryWindowABCUA
# disable item Logon from PrimaryWindowABCUA
# check item Logon from PrimaryWindowABCUA
copy "Y" to LoggedViaMe # indicate user logged on via easel
end if
end if
action Stop3270
action LogOffPROFS is
action Init3270
copy "BYE" to Keystrokes
action EnterString
# disable item Logoff from PrimaryWindowABCUA
# enable item Logon from PrimaryWindowABCUA
# uncheck item Logon from PrimaryWindowABCUA
copy "N" to LoggedViaMe # indicate user logged on via easel
action Stop3270