home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
lyrisos2.exe
/
REXXUTIL.DAT
< prev
next >
Wrap
Text File
|
1996-01-12
|
35KB
|
693 lines
/**************************************************************
* This script file is provided to give an easy access to *
* REXX commands dealing with the creation/modifcation of *
* FOLDERS and OBJECTS (Groups & Icons) for use with OS/2 *
* 2.0 and up. This file is designed to be included from *
* another script file before these functions can be called. *
**************************************************************/
/******************************************************************
* The following block defines variables that are used in this *
* script file. All 'global' variables in this script file will *
* begin with the character 'Rexx' to help prevent duplicate *
* definitions. *
******************************************************************/
@DefineVars
@Drive @RexxOS2Drive = C // contains value of OS/2 Drive
@Integer @RexxOS2Cntr = 0 // used to determine OS/2 Drive
// due to an oversight in the scripting language it is
// necessary to use the following two variables in order to
// write to a file using block comment notation - / * */
@QSTR @RexxFslash = "/"
@QSTR @RexxAsteric = "*"
@QSTR @RexxFolderID = "INSTALL_FOLDER" // default folder ID
@EndVars
/****************************************************************
* The following block defines the prototypes for the script *
* functions used in this file. All of the prototypes for the *
* functions declared in this file are shown here. *
****************************************************************/
@DefineProto
@INT @ChkIfOS2Running(@Void)
@INT @ChkIfREXXInstalled(@Void)
@Void @CreateREXXCMDFile(@IN @QSTR @REXXCMDFile)
@Void @CreateWPFolder(@IN @QSTR @Title,
@IN @QSTR @LOCATION,
@IN @QSTR @RexxFolderID,
@IN @QSTR @SETUPSTR)
@Void @CreateWPIcon(@IN @QSTR @RexxFolderID,
@IN @QSTR @Title,
@IN @QSTR @EXENAME,
@IN @QSTR @ICONFILE,
@IN @QSTR @WKINGDIR,
@IN @QSTR @SETUPSTR)
@Void @ExecuteREXXCMDFile(@IN @QSTR @REXXCMDFile)
@Void @FinishREXXCMDFile(@IN @QSTR @REXXCMDFile)
@INT @GetOS2Drive(@INOUT @Drive @RexxOS2Drive)
@Void @ModifyWPObject(@IN @QSTR @OBJECTID, @IN @QSTR @SETUPSTR)
@EndProto
/********************************************************************
NAME
@ChkIfOS2Running()
SYNOPSIS
Function returning an integer value.
DESCRIPTION
This function returns TRUE if OS/2 is running and FALSE
if it not. It's algorithm checks to see if it can find
OS/2 first (where it's installed) and then checks to
see if several environment variables are set (ones that
seem to be exclusive to OS/2 only). If any of the
variables are not set, then this function returns FALSE.
If this function can't find the OS/2 drive, then this
function returns FALSE.
PARAMETERS
This function takes no parameters.
EXAMPLE
@If(@CheckIfOS2Running())
@Display
OS/2 is running
@pause
@EndDisplay
@EndIf
SEE ALSO
@GetOS2Drive(), @CheckIfREXXInstalled()
********************************************************************/
@DefineFunc @INT @ChkIfOS2Running(@Void)
@If (@GetOS2Drive(@RexxOS2Drive) != 0)
// We can't find where OS/2 is installed, so regardless of whether
// we're running under OS/2, return that it is not running since
// we won't be able to check if REXX is installed.
@Return(@FALSE)
@EndIf
@If ("@GetENV("OS2_SHELL")" == "" &&
"@GetENV("AUTOSTART")" == "" &&
"@GetENV("RUNWORKPLACE")" == "")
// all three environment variables were NULL, so it is
// very likely (even though we found where OS/2 is installed)
// that we're not running OS/2
@Return(@False)
@EndIf
@Return(@TRUE)
@EndFunc // ChkIfOS2Running()
/********************************************************************
NAME
@ChkIfREXXInstalled()
SYNOPSIS
Function returning an integer value.
DESCRIPTION
This function returns TRUE if OS/2 has REXX installed and
FALSE if it does not. It's algorithm checks to see if it
can find several files used by REXX in the specific OS/2
directories where REXX should be installed. If any of the
files can not be found, this function returns that REXX
is not installed.
PARAMETERS
This function takes no parameters.
EXAMPLE
@If(@CheckIfOS2Running() && @CheckIfREXXInstalled())
// we're running OS/2 and REXX is installed so
// we can now execute the REXX CMD script we
// just created.
@Spawn("@RexxCMDScript")
@EndIf
SEE ALSO
@GetOS2Drive(), @CheckIfOS2Running()
********************************************************************/
@DefineFunc @INT @ChkIfREXXInstalled(@Void)
@If (@Exists("@RexxOS2Drive:\\OS2\\DLL\\REXX.DLL") &&
@Exists("@RexxOS2Drive:\\OS2\\DLL\\REXXAPI.DLL") &&
@Exists("@RexxOS2Drive:\\OS2\\DLL\\REXXUTIL.DLL") &&
@Exists("@RexxOS2Drive:\\OS2\\RXQUEUE.EXE") &&
@Exists("@RexxOS2Drive:\\OS2\\DLL\\REXXINIT.DLL"))
// all the files necessary for REXX are present, so assume
// REXX is installed. (still possible that is isn't)
@Return(@TRUE)
@EndIf
@Return(@FALSE)
@EndFunc // ChkIfREXXInstalled()
/********************************************************************
NAME
@CreateRexxCMDFile()
SYNOPSIS
@Void @CreateREXXCMDFile(@IN @QSTR @REXXCMDFile)
Function taking an @QSTRING parameter and returning @VOID.
DESCRIPTION
This function does not return a value. The only parameter
this function takes is the name of the REXX script file
(including path) that is going to be created. In addition
to creating the file, this script function will put the
necessary REXX commands into the REXX script to initialize
proper execution of the REXX script.
PARAMETERS
@IN @QSTR @REXXCMDFile
The name of the file to be created (including path)
EXAMPLE
@CreateREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
SEE ALSO
@CreateWPFolder(), @CreateWPIcon(), @ModifyWPObject(),
@ExecuteREXXCMDFile(), @FinishREXXCMDFile()
********************************************************************/
@DefineFunc @Void @CreateREXXCMDFile(@IN @QSTR @REXXCMDFile)
// REXX scripts must start with a comment, so write one
@Write("@REXXCMDFile", "WT", "@RexxFslash@RexxAsteric REXX CMD Script */\n\n")
@Write(,,"@RexxFslash@RexxAsteric Created on @DateToStr(@SystemDate) during the installation\n")
@Write(,," of @Name, version @Version. */\n\n")
// add REXX commands to load in REXX UTIL function library
@Write(,,"@RexxFslash@RexxAsteric Load REXXUTIL */\n")
@Write(,,"CALL RxFuncAdd 'SysLoadFuncs', 'REXXUtil', 'SysLoadFuncs'\n")
@Write(,,"CALL SysLoadFuncs\n\n")
@Return()
@EndFunc // @CreateREXXCMDFile()
/********************************************************************
NAME
@CreateWPFolder()
SYNOPSIS
@Void @CreateWPFolder(@IN @QSTR @Title,
@IN @QSTR @LOCATION,
@IN @QSTR @RexxFolderID,
@IN @QSTR @SETUPSTR)
Function taking four @QSTRING parameters and returning @VOID.
DESCRIPTION
This function does not return a value. This function is used
to create folders either on the DESKTOP or inside other folders
since OS/2 allows the creation of folders within folders.
Folders are analogous to GROUPS under Windows, with the objects
inside folders equivalent to ICONS or ITEMS in Windows.
PARAMETERS
@IN @QSTR @Title
A quoted string containing the name of the FOLDER to be
created. (that is the text that will appear beneath the
ICON for this particualr folder).
@IN @QSTR @LOCATION
A quoted string (or variable) containig the text used
to identify the location this folder will be created.
This value can be for example:
"WP_DESKTOP"
if this folder is to be created on the OS/2 Workplace
desktop (most common usage). However if there is already
a folder (UTILITIES for example) where you wish to place
this folder, then the ID for that folder can be used.
@IN @QSTR @RexxFolderID
A quoted string containig the name of the FOLDERID that
the operating system will return when the folder is
created. This is used for other commands such as
the destination (or location) for @CreateWPIcon() -
specifying where the ICON(s) should be placed.
@IN @QSTR @SETUPSTR)
A quoted string containing optional parameters that apply
to creating folders - fonts, background bitmaps, colors,
drag & drop capabilities and many more. Although this
parameter is required, it is not required to have a value.
Actually most often it will not contain a value and can
actually be placed as "" for the fourth paramter. If the
fourth parameter is actually used, then it is assumed
that the user who needs to use specific features will
already know REXX syntax. If the user does not know the
REXX syntax for these types of options, it is recommended
that the user purchase the following resource:
"Teach Yourself REXX in 21 Days"
by Schindler & Schindler, SAMS Publishing,
Copyright 1994.
ISBN: 0-672-30529-1
Note:
For the first three parameters, neither the single
quote ('), nor the braces ( < and > ) are needed
around the text as required by REXX syntax. These
characters are automatically placed into the REXX
command script for you. However, since the REXX
command script syntax for options (the fourth
parameter to this function) can be quit complex,
we are only providing an interface through which
the exact string can be placed into the REXX script.
Therefore the syntax as it is exactly required should
be placed within quotes - using all characters necessary
including single quotes ('), semicolons (;), braces
( < and > ) where necessary.
The following is a typical example of an optional
setup string and how it would be written within
double quotes (").
actual string:
'OBJECTID=<SUB_KDC_FOLDER_install3>;EXENAME='xe';STARTUPDIR='wrkdir';ICONFILE='icon;
actual string used as the fourth paramter to this script function:
"'OBJECTID=<SUB_KDC_FOLDER_install3>;EXENAME='xe';STARTUPDIR='wrkdir';ICONFILE='icon;"
EXAMPLE
// create the REXX script
@CreateREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// add command to create FOLDER (group) on the desktop using
// the folder name of "@Name @Version". The folder ID for
// creating Icons in that folder will be "KDC_FOLDER", and the
// fourth parameter for optional parameters is not being used
// however the "" is still placed to fill the fourth parameter
// requirements.
@CreateWPFolder("@Name @Version", "WP_DESKTOP", "KDC_FOLDER", "")
// add command to create OBJECT (icon)
@IconName = "@OutDrive:\\@SubDir\\DBPROG.exe"
@IconPath = "@OutDrive:\\@SubDir\\DBPROG.ico"
@WRKDir = "@OutDrive:\\@SubDir"
@CreateWPIcon("KDC_FOLDER", "DB APP", "@IconName", "@IconPath", "@WrkDir", "")
SEE ALSO
@CreateREXXCMDFile(), @CreateWPIcon(), @ModifyWPObject(),
@ExecuteREXXCMDFile(), @FinishREXXCMDFile()
********************************************************************/
@DefineFunc @Void @CreateWPFolder(@IN @QSTR @Title,
@IN @QSTR @LOCATION,
@IN @QSTR @RexxFolderID,
@IN @QSTR @SETUPSTR)
@Write(,,"@RexxFslash@RexxAsteric Create the Folder - @Title on the Desktop */\n")
@Write(,,"classname = 'WPFolder'\n")
@Write(,,"location = '<@LOCATION>'\n")
@If("@SETUPSTR" == ""
@Write(,,"setup = 'OBJECTID=<@RexxFolderID>'\n")
@Else
@Write(,,"setup = @SETUPSTR\n")
@EndIf
@Write(,,"title = '@Title'\n")
@Write(,,"return = SysCreateObject(classname, title, location, setup)\n\n")
@Return()
@EndFunc // @CreateWPFolder()
/********************************************************************
NAME
@CreateWPIcon()
SYNOPSIS
@Void @CreateWPIcon(@IN @QSTR @RexxFolderID,
@IN @QSTR @Title,
@IN @QSTR @EXENAME,
@IN @QSTR @ICONFILE,
@IN @QSTR @WKINGDIR,
@IN @QSTR @SETUPSTR)
Function taking six @QSTRING parameters and returning @VOID.
DESCRIPTION
This function does not return a value. This function is used
to create objects (either folders or icons) on the DESKTOP or
inside other folders since OS/2 allows the creation of folders
within folders. Folders are analogous to GROUPS under Windows,
with the objects inside folders equivalent to ICONS or ITEMS in
Windows.
PARAMETERS
@IN @QSTR @REXXFolderID
A quoted string (or variable) containig the text used
to identify the location this folder will be created.
This value can be for example:
"WP_DESKTOP" or "KDC_FOLDER"
if this item is to be created on the OS/2 Workplace
desktop. However it is more likely it will contain the
value used as the third parameter of the @CreateWPFolder()
function - the ID assigned by the Operating System when
the folder was created.
@IN @QSTR @Title
A quoted string containing the name of the object to be
created. (that is the text that will appear beneath the
ICON for this particualr item).
@IN @QSTR @EXEName
A quoted string containing the name of the object's exe
to be executed when the item is double clicked. (this
variable should contain the exe (with optional path) only
and NO COMMAND LINE OPTIONS.
@IN @QSTR @ICONFile
A quoted string containig the name of the icon used for this
object.
@IN @QSTR @WKINGDIR
A quoted string containing the working directory to be used
when this particular item is executed.
@IN @QSTR @SETUPSTR
A quoted string containing an optional setup string to modify
other attributes of folders and objects such as fonts, colors,
backgrounds, full screen vs windowed, PM application vs text,
windows program, drag & drop characteristics, etc.
Note:
For the first five parameters, neither the single
quote ('), nor the braces ( < and > ) are needed
around the text as required by REXX syntax. These
characters are automatically placed into the REXX
command script for you. However, since the REXX
command script syntax for options (the sixth
parameter to this function) can be quit complex,
we are only providing an interface through which
the exact string can be placed into the REXX script.
Therefore the syntax as it is exactly required should
be placed within quotes - using all characters necessary
including single quotes ('), semicolons (;), braces
( < and > ) where necessary.
It is assumed that the developer know the appropriate REXX
syntax for manipulating these optional parameters. If you
are unfamiliar with REXX syntax, please refer to an outside
source which documents the REXX syntax. One source can be
found from OS/2 directly (using the INFORMATION icon), or
several books exist on the subject. One particular book
KDC recommends is the following:
"Teach Yourself REXX in 21 Days"
by Schindler & Schindler, SAMS Publishing,
Copyright 1994.
ISBN: 0-672-30529-1
EXAMPLE
// create the REXX script
@CreateREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// add command to create FOLDER (group) on the desktop using
// the folder name of "@Name @Version". The folder ID for
// creating Icons in that folder will be "KDC_FOLDER", and the
// fourth parameter for optional parameters is not being used
// however the "" is still placed to fill the fourth parameter
// requirements.
@CreateWPFolder("@Name @Version", "WP_DESKTOP", "KDC_FOLDER", "")
// add command to create OBJECT (icon)
@IconName = "@OutDrive:\\@SubDir\\DBPROG.exe"
@IconPath = "@OutDrive:\\@SubDir\\DBPROG.ico"
@WRKDir = "@OutDrive:\\@SubDir"
@CreateWPIcon("KDC_FOLDER", "DB APP", "@IconName", "@IconPath",
"@WrkDir", "")
SEE ALSO
@CreateREXXCMDFile(), @CreateWPFolder(), @ModifyWPObject(),
@ExecuteREXXCMDFile(), @FinishREXXCMDFile()
********************************************************************/
@DefineFunc @Void @CreateWPIcon(@IN @QSTR @RexxFolderID,
@IN @QSTR @Title,
@IN @QSTR @EXENAME,
@IN @QSTR @ICONFILE,
@IN @QSTR @WKINGDIR,
@IN @QSTR @SETUPSTR)
@Write(,,"@RexxFslash@RexxAsteric Create the Icon - @Title */\n")
@Write(,,"classname = 'WPProgram'\n")
@Write(,,"location = '<@RexxFolderID>'\n")
@Write(,,"title = '@Title'\n")
@If("@SETUPSTR" == "")
@Write(,,"xe = '@EXENAME'\n")
@Write(,,"icon = '@ICONFILE'\n")
@Write(,,"wrkdir = '@WKINGDIR'\n")
@Write(,,"setup = 'OBJECTID=<@RexxFolderID_@TITLE>;EXENAME='xe';STARTUPDIR='wrkdir';ICONFILE='icon;\n")
@Else
@Write(,,"setup = @SETUPSTR\n")
@EndIf
@Write(,,"return = SysCreateObject(classname, title, location, setup)\n\n")
@Return()
@EndFunc // @CreateWPIcon()
/********************************************************************
NAME
@ExecuteRexxCMDFile()
SYNOPSIS
@Void @ExecuteREXXCMDFile(@IN @QSTR @REXXCMDFile)
Function taking an @QSTRING parameter and returning @VOID.
DESCRIPTION
This function executes the REXX command script if possible.
If first checks to see if OS/2 is runnig, and then also if
REXX is installed. If both conditions are true, then it will
spawn a process off to execute the REXX script. To the end-user
this will be transparent as no focus changes or task switching
will occur. If INSTALL is run from within a window rather than
full screen, then the only change that takes place during
execution is the text in the title bar for the INSTALL window
will briefly contain the name of the script command being
executed.
PARAMETERS
@IN @QSTR @REXXCMDFile
The name of the file to be executed (including path)
EXAMPLE
// create the REXX script
@CreateREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// add command to create FOLDER (group) on the desktop using
// the folder name of "@Name @Version". The folder ID for
// creating Icons in that folder will be "KDC_FOLDER", and the
// fourth parameter for optional parameters is not being used
// however the "" is still placed to fill the fourth parameter
// requirements.
@CreateWPFolder("@Name @Version", "WP_DESKTOP", "KDC_FOLDER", "")
// add command to create OBJECT (icon)
@IconName = "@OutDrive:\\@SubDir\\DBPROG.exe"
@IconPath = "@OutDrive:\\@SubDir\\DBPROG.ico"
@WRKDir = "@OutDrive:\\@SubDir"
@CreateWPIcon("KDC_FOLDER", "DB APP", "@IconName", "@IconPath",
"@WrkDir", "")
// write the EXIT command to the REXX file
@FinishREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// actually execute the REXX command script if possible
@ExecuteREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
SEE ALSO
@CreateWPFolder(), @CreateWPIcon(), @ModifyWPObject(),
@CreateREXXCMDFile(), @FinishREXXCMDFile()
********************************************************************/
@DefineFunc @Void @ExecuteREXXCMDFile(@IN @QSTR @REXXCMDFile)
@If(@ChkIfOS2Running() && @ChkIfREXXInstalled())
@Spawn("@REXXCMDFile")
@EndIf
@Return()
@EndFunc // @ExecuteREXXCMDFile()
/********************************************************************
NAME
@FinishRexxCMDFile()
SYNOPSIS
@Void @FinishREXXCMDFile(@IN @QSTR @REXXCMDFile)
Function taking an @QSTRING parameter and returning @VOID.
DESCRIPTION
This function will finish writing to the REXX command script
the 'EXIT' command. It should be called after all other
script commands that add text to the REXX script file. This
will ensure proper exiting of the REXX command script after
execution and thus enabling proper return of control to
INSTALL.
PARAMETERS
@IN @QSTR @REXXCMDFile
The name of the file to write the EXIT command (including path)
EXAMPLE
// create the REXX script
@CreateREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// add command to create FOLDER (group) on the desktop using
// the folder name of "@Name @Version". The folder ID for
// creating Icons in that folder will be "KDC_FOLDER", and the
// fourth parameter for optional parameters is not being used
// however the "" is still placed to fill the fourth parameter
// requirements.
@CreateWPFolder("@Name @Version", "WP_DESKTOP", "KDC_FOLDER", "")
// add command to create OBJECT (icon)
@IconName = "@OutDrive:\\@SubDir\\DBPROG.exe"
@IconPath = "@OutDrive:\\@SubDir\\DBPROG.ico"
@WRKDir = "@OutDrive:\\@SubDir"
@CreateWPIcon("KDC_FOLDER", "DB APP", "@IconName", "@IconPath",
"@WrkDir", "")
// write the EXIT command to the REXX file
@FinishREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// actually execute the REXX command script if possible
@ExecuteREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
SEE ALSO
@CreateWPFolder(), @CreateWPIcon(), @ModifyWPObject(),
@CreateREXXCMDFile(), @ExecuteREXXCMDFile()
********************************************************************/
@DefineFunc @Void @FinishREXXCMDFile(@IN @QSTR @REXXCMDFile)
@Write("@REXXCMDFile", "AT", "EXIT\n")
@Return()
@EndFunc // @FinishREXXCMDFile()
/********************************************************************
NAME
@GetOS2Drive()
SYNOPSIS
Function returning an integer value.
DESCRIPTION
This function returns 0 if the OS/2 directories can be found,
and 1 if they can not be found. If the directories can be found
then the drive variable that is passed in will be updated so
that when the functions returns it will contain the correct value.
PARAMETERS
@INOUT @Drive @RexxOS2Drive
This value will store the drive containing the OS/2 directories
if they can be found.
EXAMPLE
@If(@GetOS2Drive(@OS2Drive))
@Display
Could not find the OS/2 Drive.
REXX will not be run.
@pause
@EndDisplay
@EndIf
SEE ALSO
@CheckIfOS2Installed(), @CheckIfREXXInstalled()
********************************************************************/
@DefineFunc @INT @GetOS2Drive(@INOUT @Drive @RexxOS2Drive)
@If(@Exists("@BootDrive:\\OS2") && @Exists("@BootDrive:\\OS2\\DLL"))
@RexxOS2Drive = @BootDrive // found drive
@Return(0)
@EndIf
@RexxOS2Cntr = 67
LOOP:
@RexxOS2Drive = (@RexxOS2Cntr)
@If(@Exists("@RexxOS2Drive:\\OS2") && @Exists("@RexxOS2Drive:\\OS2\\DLL"))
@Return(0) // found drive
@Else
@RexxOS2Cntr = (@RexxOS2Cntr + 1)
@If(@RexxOS2Cntr > 90)
@Return(1) // did not find drive
@Else
@GOTO LOOP
@EndIf
@EndIf
@Return(1) // did not find drive
@EndFunc // @GetOS2Drive
/********************************************************************
NAME
@ModifyWPObject()
SYNOPSIS
@Void @ModifyWPObject(@IN @QSTR @OBJECTID, @IN @QSTR @SETUPSTR)
Function taking two @QSTRING parameters and returning @VOID.
DESCRIPTION
This function will write the REXX commands necessary to modify an
existing Object (could also be folder). It is recommended that the
fourth parameter of @CreateWPFolder() and sixth parameter of
@CreateWPIcon() not actually be used (pass a value of "") and if
the skilled REXX programmer need to customize the object after it has
been created, use this function instead of the above mentioned optional
parameters. As was described for the optional paramters in the two
functions above, it is assumed that the user have an thorough knowledge
of REXX syntax when refering to modification of objects.
PARAMETERS
@IN @QSTR @OBJECTID
The OBJECT ID of the object to be modified.
@IN @QSTR @SETUPSTR
The optional setup string to be applied to the specified object.
Please note that exact REXX syntax must be used in this parameter
including all punctuation characters, delimeters, etc. (single
quotes, commas, semicolons, double quotes, etc.)
EXAMPLE
// create the REXX script
@CreateREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// add command to create FOLDER (group) on the desktop using
// the folder name of "@Name @Version". The folder ID for
// creating Icons in that folder will be "KDC_FOLDER", and the
// fourth parameter for optional parameters is not being used
// however the "" is still placed to fill the fourth parameter
// requirements.
@CreateWPFolder("@Name @Version", "WP_DESKTOP", "KDC_FOLDER", "")
// add command to create OBJECT (icon)
@IconName = "@OutDrive:\\@SubDir\\DBPROG.exe"
@IconPath = "@OutDrive:\\@SubDir\\DBPROG.ico"
@WRKDir = "@OutDrive:\\@SubDir"
@CreateWPIcon("KDC_FOLDER", "DB APP", "@IconName", "@IconPath",
"@WrkDir", "")
// make the background of the Folder to be STARS.BMP
@ModifyWPObject("KDC_FOLDER", "'BACKGROUND=D:\\OS2\\BITMAP\\STARS.BMP'")
// write the EXIT command to the REXX file
@FinishREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
// actually execute the REXX command script if possible
@ExecuteREXXCMDFile("@OutDrive:\\@Subdir\\rxscript.cmd")
SEE ALSO
@CreateWPFolder(), @CreateWPIcon(), @FinishREXXCMDFile(),
@CreateREXXCMDFile(), @ExecuteREXXCMDFile()
********************************************************************/
@DefineFunc @Void @ModifyWPObject(@IN @QSTR @OBJECTID, @IN @QSTR @SETUPSTR)
@Write(,,"@RexxFslash@RexxAsteric Modify Object Atrributes of - @OBJECTID */\n")
@Write(,,"object = '<@OBJECTID>'\n")
@Write(,,"settings = @SETUPSTR\n")
@Write(,,"return = SysSetObjectData(object, settings)\n\n")
@Return()
@EndFunc // @ModifyWPObject()
/****************************************************************************
* This is the end of this script. This script is intended to be included *
* from another script, and after doing so, the above script functions may *
* be called anywhere ordinary functions are valid. *
****************************************************************************/