home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
EASL2PRF.ZIP
/
PROFSEND.EAL
< prev
next >
Wrap
Text File
|
1991-04-01
|
6KB
|
190 lines
# PROFSEND - Easel application to send files from PC to VM and optionally
# store in PROFS Database. If store option is invoked, the user is
# prompted for mailing the file.
#
# This program was developed by Mark Polly for Progressive Insurance. Since
# it is an EASEL application, it requires Easel Runtime for OS/2.
#
# Generated by Layout/CUA
# (Layout/CUA COPYRIGHT (C) INTERACTIVE IMAGES, INC.1989. ALL RIGHTS
#RESERVED)
# Code generated on TUESDAY JANUARY 23, 1990 at TIME 10:31:03
#
application DIRLIST
application SENDFILE
module m3270
include fileio.inc
fileid FileID
string TermID TermPrefix LogMode
string PassWord MockPW UserID PassWordHidden InitMsg
string Access is "write"
integer I Count
include pmptr.inc
include accel.inc
#
# Action Bar Template Definition(s)
#
action bar PrimaryWindowABCUA is
pulldown File text "~Send or Receive Files"
choice Send text "~Send Files To PROFS..."
choice Receive text "~Receive Files From PROFS..."
separator
choice ExitCUA text "E~xit\tF3"
accelerator is KEY_F3
end pulldown
pulldown Log1 text "~Log on and off PROFS"
choice Logon text "~Logon to PROFS"
choice Logoff text "Log~off PROFS"
end pulldown
end action bar
#
# Primary Window Graphical Region Definition
#
enabled visible color 26 primary graphical region PrimaryWindow
size 600 280
at position 27 45
color 27 foreground
size border
title bar "Transfer File To/From PROFS"
system menu
horizontal scroll bar scroll by 6
vertical scroll bar scroll by 16
# no scale
action bar PrimaryWindowABCUA
minimize button
maximize button
enabled visible color 26 image region ImageWindow
size 575 280
at position 20 60
color 27 foreground
cache viewport
file "progbw2.pcx"
include getdisk.inc
include message.inc
include profsend.inc
#nclude logprofs.inc
#
action HidePW is
copy text of PassWordEF to PassWord
copy length of PassWord to Count
copy " " to MockPW
for I = 1 to Count loop
append "*" to MockPW
end loop
change PassWordHiddenEF text to MockPW
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
change InitializeST text to "Logging on to PROFS..."
make InitializeDB visible
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
make InitializeDB invisible
enable item Logoff from PrimaryWindowABCUA in PrimaryWindow
disable item Logon from PrimaryWindowABCUA in PrimaryWindow
check item Logon from PrimaryWindowABCUA in PrimaryWindow
copy "Y" to LoggedViaMe # indicate user logged on via easel
end if
end if
action Stop3270
action LogOffPROFS is
change InitializeST text to "Logging off of PROFS..."
make InitializeDB visible
action Init3270
copy "BYE" to Keystrokes
action EnterString
disable item Logoff from PrimaryWindowABCUA in PrimaryWindow
enable item Logon from PrimaryWindowABCUA in PrimaryWindow
uncheck item Logon from PrimaryWindowABCUA in PrimaryWindow
copy "N" to LoggedViaMe # indicate user logged on via easel
action Stop3270
make InitializeDB invisible
#
# Response Definition(s)
#
response to start
if (BuiltDirListDB) then
make ChooseFileDB visible
else
change InitializeST text to "Loading, please wait..."
make InitializeDB visible
clear DiskDriveLB # set up the Choose file dialog box
copy 0 to NumDisks
call GetDrives(NumDisks) # get list of valid drives
copy 1 to PCListName
call SetupChooseFileDB( PCListName ) # set up the dialog box
end if
make InitializeDB invisible
if (ReplyToMessage("", "Are you logged on to PROFS?",4,1,16) = "no" ) then
copy "" to UserID
copy "" to PassWord
copy "" to PassWordHidden
call SetupUserIDDB(UserID,PassWordHidden,PassWord)
make UserIDDB visible
copy false to DidOKCUA
call ProcessUserIDDB(DidOKCUA)
if (DidOKCUA) then
call QueryUserIDDB(UserID,PassWordHidden,PassWord)
action LogonToPROFS
end if
end if
response to item ExitCUA from PrimaryWindowABCUA
exit