home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
vsecom3.zip
/
WINDOW14.VRX
< prev
next >
Wrap
Text File
|
1994-12-15
|
4KB
|
183 lines
/*:VRX Main
*/
/* Main
*/
Main:
/* Process the arguments.
Get the parent window.
*/
parse source . calledAs .
parent = ""
argCount = arg()
argOff = 0
if( calledAs \= "COMMAND" )then do
if argCount >= 1 then do
parent = arg(1)
argCount = argCount - 1
argOff = 1
end
end
InitArgs.0 = argCount
if( argCount > 0 )then do i = 1 to argCount
InitArgs.i = arg( i + argOff )
end
drop calledAs argCount argOff
/* Load the windows
*/
call VRInit
parse source . . spec
_VREPrimaryWindowPath = ,
VRParseFileName( spec, "dpn" ) || ".VRW"
_VREPrimaryWindow = ,
VRLoad( parent, _VREPrimaryWindowPath )
drop parent spec
if( _VREPrimaryWindow == "" )then do
call VRMessage "", "Cannot load window:" VRError(), ,
"Error!"
_VREReturnValue = 32000
signal _VRELeaveMain
end
/* Process events
*/
call Init
signal on halt
do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
_VREEvent = VREvent()
interpret _VREEvent
end
_VREHalt:
_VREReturnValue = Fini()
call VRDestroy _VREPrimaryWindow
_VRELeaveMain:
call VRFini
exit _VREReturnValue
VRLoadSecondary: procedure
name = arg( 1 )
window = VRLoad( VRWindow(), VRWindowPath(), name )
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
return window
/*:VRX Fini
*/
Fini:
window = VRWindow()
call VRSet window, "Visible", 0
drop window
return retcode
/*:VRX Halt
*/
Halt:
signal _VREHalt
return
/*:VRX Init
*/
Init:
if InitArgs.1 = "SEND" then do
ok = VRSet( "DT_5", "CAPTION", "COPY FROM:")
ok = VRSet( "DT_6", "CAPTION", "COPY TO:")
end
if InitArgs.1 = "REC" then do
ok = VRSet( "DT_5", "CAPTION", "COPY TO:")
ok = VRSet( "DT_6", "CAPTION", "COPY FROM:")
end
window = VRWindow()
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
drop window
return
/*:VRX PB_1_Click
*/
PB_1_Click:
retcode = ""
EF_1 = VRGet("EF_1","Value")
EF_2 = VRGet("EF_2","Value")
EF_3 = VRGet("EF_3","Value")
EF_4 = VRGet("EF_4","Value")
EF_5 = VRGet("EF_5","Value")
EF_6 = VRGet("EF_6","Value")
part1 = EF_1
part2 = EF_4||" "||EF_5||" ( FILE=LIB"
opts = ""
nowopt = ""
ok = VRGet("RB_2","Set")
if ok = "1" then do
nowopt = "BINARY"
opts = nowopt
nowopt = ""
end
ok = VRGet("RB_3","Set")
if ok = "1" then do
nowopt = "NOCRLF"
opts = opts||" "||nowopt
nowopt = ""
end
nowopt ="L="||EF_2||" "||"S="||EF_3
opts = opts||" "||nowopt
nowopt = ""
ok = VRGet("CB_2","Set")
if ok = "1" then do
nowopt = "UC"
opts = opts||" "||nowopt
nowopt = ""
end
ok = VRGet("CB_4","Set")
if ok = "1" then do
nowopt = "REPLACE"
opts = opts||" "||nowopt
nowopt = " "
end
opts = opts||" "||nowopt
nowopt = " "
ok = VRGet("CB_3","Set")
if ok = "1" then do
nowopt = "DATA=YES"
opts = opts||" "||nowopt
nowopt = ""
end
ok = VRGet("CB_1","Set")
if ok = "1" then do
nowopt = "TRACE=LST"
opts = opts||" "||nowopt
nowopt = ""
end
opts = opts||" "||EF_6
retcode = part1||","||part2||","||opts
call Quit
return
/*:VRX PB_2_Click
*/
PB_2_Click:
retcode = ""
call Quit
return
/*:VRX Quit
*/
Quit:
window = VRWindow()
call VRSet window, "Shutdown", 1
drop window
return
/*:VRX Window5_Close
*/
Window5_Close:
call Quit
return