home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
RXTCPA.ZIP
/
BUILDRTR.CMD
next >
Wrap
OS/2 REXX Batch file
|
1993-03-26
|
5KB
|
78 lines
/* FOLDER.CMD: Sample code using REXXUTIL's SysCreateObject function */
/* Builds a folder on the DeskTop and places some program objects in it.*/
/* Mike Lamb: MIKELAMB/KGNVMC */
/* Modified by George Clark 71242,41 for the purposes of creating program */
/* objects for IBM TCP/IP. */
/* Load REXXUTIL */
call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
call sysloadfuncs
/*The basic call is listed next. */
/*rc=SysCreateObject(classname, title, location <,setup>, <,duplicateflag>)*/
call SysCls
Say '';Say 'Using REXXUTILs to Add a Folder and Program Objects...'
Say '';Say 'Press Y to add Routers Folder to Desktop...';Say '';
parse upper value SysGetKey('NOECHO') with key
If key<>'Y' Then Exit
/* All of the routines pass parameters to a subroutine to perform the call */
classname='WPFolder'
title='Routers'
location='<WP_DESKTOP>'
setup='OBJECTID=<Routers>;'||,
'OPEN=DEFAULT;'
Call BldObj
Say 'Press ENTER and we will add a few program objects...'
key=SysGetKey()
Say 'Place a program object into the folder...';Say '';
classname='WPProgram'
title='NWR1'
location='<Routers>'
setup='OBJECTID=<RtrNWR1>;'||,
'EXENAME=VT220.EXE;'||,
'PARAMETERS=111.222.111.222;'||,
'PROGTYPE=WINDOWABLEVIO;'
Call BldObj
title='CTVF1'
location='<Routers>'
setup='OBJECTID=<RtrCTVF1>;'||,
'EXENAME=VT220.EXE;'||,
'PARAMETERS=111.222.111.111;'||,
'PROGTYPE=WINDOWABLEVIO;'
Call BldObj
title='NBV1'
location='<Routers>'
setup='OBJECTID=<RtrNBV1>;'||,
'EXENAME=VT220.EXE;'||,
'PARAMETERS=111.222.111.1;'||,
'PROGTYPE=WINDOWABLEVIO;'
Call BldObj
Exit
/* Build Object */
BldObj:
call charout ,'Building: 'title
/* Build object using REPLACE as duplicateflag */
result = SysCreateObject(classname, title, location, setup, 'R')
If result=1 Then call charout ,'... Object created!'
Else call charout ,'... Not created! Return code='result
Say '';
Return