home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
mpm1_28.zip
/
mpmrexx.inf
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1995-10-05
|
16KB
|
439 lines
ΓòÉΓòÉΓòÉ 1. REXX Extensions ΓòÉΓòÉΓòÉ
This section details each of the REXX extensions added by MaxFile/PM.
ΓòÉΓòÉΓòÉ 1.1. MPM_GetVersion() ΓòÉΓòÉΓòÉ
Returns MaxFile/PM's revision or version number.
ΓòÉΓòÉΓòÉ 1.2. MPM_ClearWindow() ΓòÉΓòÉΓòÉ
Clears the REXX output window.
ΓòÉΓòÉΓòÉ 1.3. MPM_MsgBox(message, title) ΓòÉΓòÉΓòÉ
Displays a simple message box using 'message' as the text displayed in the
message box and 'title' as the title for the message box.
ΓòÉΓòÉΓòÉ 1.4. MPM_QueryArea([area tag]) ΓòÉΓòÉΓòÉ
Works in two different ways. Called with no arguments it returns the area tag
of the first file area listed in the Main File Area window listing. When called
with a single argument containing the area tag of an existing file area, it
will return the area tag of the NEXT file area in the list. In either case, if
an area can't be found it returns 'ERROR'.
ΓòÉΓòÉΓòÉ 1.5. MPM_QueryAreaList('stemvar') ΓòÉΓòÉΓòÉ
Creates a compound stem variable containing the area tag, description, download
path and the full path/filename of the FILES.BBS for each area.
The stem variable name is passed to the function as a string. stemvar.0
contains the total number of areas that information has been returned for.
An example of how to use this function follows:
/* MPM_QueryAreaList() example */
rc = MPM_QueryAreaList('arealist')
Say arealist.0' items in Area List.'
Say arealist.1.area' is the first area.'
Say arealist.1.desc' is the first area description.'
Say arealist.1.path' is the first area download path.'
Say arealist.1.fbbs' is the first area FILES.BBS location.'
ΓòÉΓòÉΓòÉ 1.6. MPM_QueryAreaInfo(area tag, '0' | '1' | '2') ΓòÉΓòÉΓòÉ
Queries and returns the specified information for 'area tag.' The level info is
as follows:
0 - Area description
1 - Download Path
2 - FILES.BBS Location
ΓòÉΓòÉΓòÉ 1.7. MPM_DeselectArea([area tag]) ΓòÉΓòÉΓòÉ
Detags a file area in the Main File Area window. If area tag is ommitted the
selection emphasis is removed from all items in the window.
ΓòÉΓòÉΓòÉ 1.8. MPM_SelectArea(area tag) ΓòÉΓòÉΓòÉ
Tags a file area in the Main File Area Window.
ΓòÉΓòÉΓòÉ 1.9. MPM_OpenArea(area tag) ΓòÉΓòÉΓòÉ
Opens the FILES.BBS Window associated with 'area tag'. If this function returns
'OK' the window _IS_ open, v. the old behaviour of just letting you know the
message to open the window got posted okay.
ΓòÉΓòÉΓòÉ 1.10. MPM_CloseArea(area tag) ΓòÉΓòÉΓòÉ
Closes the FILES.BBS window associated with 'area tag.'
ΓòÉΓòÉΓòÉ 1.11. MPM_IsAreaOpen(area tag) ΓòÉΓòÉΓòÉ
Returns "1" if the FILES.BBS window associated with 'area tag' is open, "0"
otherwise.
ΓòÉΓòÉΓòÉ 1.12. MPM_AllFilesList() ΓòÉΓòÉΓòÉ
Starts up the All Files List generator in interactive mode, the list generated
will be made up of the file areas that are selected in the File Area window.
Use MPM_SelectArea() and MPM_DeselectArea() to select areas from REXX.
ΓòÉΓòÉΓòÉ 1.13. MPM_OutDated(days, 'MOVE | KILL', areatag) ΓòÉΓòÉΓòÉ
Performs an outdated file scan on the selected file areas in the File Area
window based on the arguments passed. All three arguments MUST be present.
days is the number of days old a file can be, anything older than days will
either be deleted or moved.
MOVE | KILL selects whether you want the files MOVEd or KILLed. If you want
files moved, areatag must contain the area tag or name (case MUST match) of an
existing file area.
When KILL is selected the areatag is ignored, but it still MUST be present.
ΓòÉΓòÉΓòÉ 1.14. MPM_SetFDUFlag(area tag) ΓòÉΓòÉΓòÉ
Sets the File Database Utility flag for the FILES.BBS that is associated with
'area tag.' Use this to tell MaxFile/PM that the File Database Utility needs to
be run to update your file database after making changes that MaxFile/PM
doesn't know about.
ΓòÉΓòÉΓòÉ 1.15. MPM_QueryFile(area tag[, filename]) ΓòÉΓòÉΓòÉ
Returns the base filename of a file from a FILES.BBS window. When called with
just the area tag of an open window it returns the first file in the window.
When called with both the area tag and an existing filename it will return the
NEXT filename in the window. If something goes wrong it returns ERROR.
ΓòÉΓòÉΓòÉ 1.16. MPM_QueryFileList(area tag, 'stemvar') ΓòÉΓòÉΓòÉ
Creates a compound stem variable containing a list of all the files in the
FILES.BBS associated with 'area tag'. The stem variable name is passed as a
string to the function. stemvar.0 contains how many items are in the list.
An example follows:
/* MPM_QueryFileList() example */
mpmarea = 'TEST'
/* Open up the file area */
retval = MPM_OpenArea(mpmarea)
If MPM_IsAreaOpen(mpmarea) = '0' then Exit
rc = MPM_QueryFileList(mpmarea, 'files')
rc = MPM_CloseArea(mpmarea)
Say 'There are 'files.0' files in the list.'
Say
Say files.1.file' is the first file.'
Say files.1.path' is the path of the first file.'
Say files.1.desc' is the description of the first file.'
ΓòÉΓòÉΓòÉ 1.17. MPM_QueryFileInfo(area tag, filename, '0' | '1' | '2' | '3') ΓòÉΓòÉΓòÉ
Queries and returns the specified information about 'filename.'
The level information is as follows:
0 - File Path
1 - File Date in DD MMM YYYY format
3 - File Size
4 - File Description
ΓòÉΓòÉΓòÉ 1.18. MPM_SelectFile(area tag, filename) ΓòÉΓòÉΓòÉ
Select 'filename' in the area identified by 'area tag'.
ΓòÉΓòÉΓòÉ 1.19. MPM_DeselectFile(area tag, filename) ΓòÉΓòÉΓòÉ
Deselect 'filename' in the area identified by 'area tag'.
ΓòÉΓòÉΓòÉ 1.20. MPM_SetFileInfo(area tag, filename, '0' | '1' | '2') ΓòÉΓòÉΓòÉ
Set the displayed information for a file in a FILES.BBS window.
The level information is as follows:
0 - Set File Date
1 - Set File Size
2 - Set Description
Note: options 0 and 1 are only for display purposes, if you want to set the
file's date ("touch" it) you need to perform this yourself, MaxFile/PM does not
do this for you, the same goes for the file's size. This REXX extension is
merely to update the display in the FILES.BBS window. Option 2, for setting
descriptions, does actually alter the description that will get saved for the
file.
Dates should be in the format DD MMM YYYY, E.G: 01 Dec 1993. Sizes should be
unformatted with no thousands separators.
ΓòÉΓòÉΓòÉ 1.21. MPM_RemoveFile(area tag, filename) ΓòÉΓòÉΓòÉ
Removes the file 'filename' from the FILES.BBS window associated with 'area
tag'.
ΓòÉΓòÉΓòÉ 1.22. MPM_AddFile(area tag, filename, description) ΓòÉΓòÉΓòÉ
Adds 'filename' with description to the FILES.BBS window associated with 'area
tag'. 'filename' MUST be a FULL file specification in the form of
D:\PATH\FILENAME.EXE! The function returns 'ERROR' if something goes wrong.
ΓòÉΓòÉΓòÉ 1.23. MPM_AnnounceFiles('stemvar') ΓòÉΓòÉΓòÉ
Creates a file announcement message and writes it to a Squish or *.MSG message
base. The message is built from the information stored in the compound stem
variable 'stemvar'.
Please see TANN.CMD (included in the distribution archive) for an example of
how to use this extension.
The elements of the message that need to be placed in 'stemvar' are as follows:
stemvar.msgpath is the root path of the message area to
place the message in.
stemvar.msgproc is the executable name and switches
needed to run your mail tosser/packer,
this one is optional, if it isn't
defined it is ignored.
stemvar.msgtype this defines the type of message base
and must be one of: SQUISH, MSG or
MSGECHO.
stemvar.msgflag is the message flag you want to use for
this message, it must be one of: HOLD,
NORMAL, CRASH or DIRECT.
stemvar.to is the name to address the message to,
if it isn't defined it defaults to
'All'.
stemvar.toaddr this the Fidonet style address of the
recipient of the message. It must be in
the format Zone:Net/Node.Point, I.E,
1:201/60.0, if not defined it defaults
to stemvar.fromaddr.
stemvar.from is the name the message is from, this
one is required.
stemvar.fromaddr is the address of who the message is
from, in other words, the originating
Fidonet address. This one is also
required.
stemvar.subject this gets put in the subject field of
the message. If not defined it defaults
to 'File Announcement'.
stemvar.header is the header of the message, it gets
placed just before the file list in the
message. This one is optional. 1024
character limit.
stemvar.footer this is similar to the header, except it
comes after the file list in the
message. It is also optional. 1024
character limit.
stemvar.origin this is the text that will get put in
the origin line of the message. The " *
Origin: " and from fidonet address are
taken care for you. All you need to
enter here is what text you want added
in between the two. This is optional, if
it is not defined no origin line is
generated.
stemvar.0 contains the number files being
announced.
stemvar.x.file this is the base filename of a file to
announce.
stemvar.x.path is the drive and path to the above base
filename. Do NOT include the filename
here.
stemvar.x.desc this is the description you want to use
for this file in the message. 1024
character limit.
'x' in the above three is a place holder for each of the files that you want
announced, up to stemvar.0 files.
ΓòÉΓòÉΓòÉ 1.24. MPM_FileAreaSort(area tag, 'Name|Date|Size|Desc', 'Asc|Desc'[, 'All']) ΓòÉΓòÉΓòÉ
Sorts the file area 'area tag' by; Name, Date, Size or Desc. In either
ascending or descending order, optionally deselecting all highlighted files.
This function behaves just like the menu options on the FILES.BBS context menu,
if any items are selected ONLY those items are sorted. If you want to sort the
entire area make sure you pass the fourth argument 'All' to it.
Here are a few examples:
rc = MPM_FileAreaSort('0', 'Name', 'Asc')
Sorts area 0 by name in ascending order.
rc = MPM_FileAreaSort('FWBBS', 'Date', 'Desc')
Sorts area FWBBS by date in descending order.
rc = MPM_FileAreaSort('FWCOMM', 'Date', 'Desc', 'All')
Sorts area FWCOMM by date in descending order, first
deselecting all selected files.
ΓòÉΓòÉΓòÉ 1.25. MPM_AdoptFiles(area tag) ΓòÉΓòÉΓòÉ
Performs an adopt on all orphaned files in the file area 'area tag'. area tag
MUST be open.
ΓòÉΓòÉΓòÉ 1.26. MPM_ReArchive(area tag, archivetype) ΓòÉΓòÉΓòÉ
Rearchives all selected files in the area 'area tag' to 'archivetype'. area tag
MUST be open.
archivetype should be one of:
ZIP
ARJ
LZJ
ARC
HA
RAR
UC2
ZOO
ΓòÉΓòÉΓòÉ 1.27. MPM_PurgeDupes(area tag) ΓòÉΓòÉΓòÉ
Scans through the file area 'area tag' and removes all duplicate file entries.
area tag MUST be open.
ΓòÉΓòÉΓòÉ 1.28. MPM_RemoveMissingFiles(area tag) ΓòÉΓòÉΓòÉ
Scans through the file area 'area tag' and removes all entries for files that
do not exist. area tag MUST be open.
ΓòÉΓòÉΓòÉ 1.29. MPM_CleanseDescriptions(area tag) ΓòÉΓòÉΓòÉ
Cleanses the descriptions for all selected files in the area 'area tag'. area
tag MUST be open.
ΓòÉΓòÉΓòÉ 1.30. MPM_GetDIZFiles(area tag) ΓòÉΓòÉΓòÉ
Attempts to extract and use FILE_ID.DIZ, DESC.SDI or SDN.ID for the selected
files in the area 'area tag'. area tag MUST be open.
ΓòÉΓòÉΓòÉ 1.31. MPM_QueryFilesBBS(area tag, stemvar) ΓòÉΓòÉΓòÉ
Returns the FILES.BBS for 'area tag' in the compound stem variable 'stemvar'.
area tag does not have to be open, but if it is, make sure you save the
FILES.BBS before you call this function. 'ERROR' is returned if an error occurs
or there are no entries in the FILES.BBS file.
stemvar.0 will contain the number of entries.
stemvar.1 - stemvar.x will each contain one entry from the FILES.BBS. The
FILES.BBS will be parsed according to your settings for Extended Description
Marker, FileList Margin, File Headers and Header Size. In general, each string
is formatted just like the entries you view in your FILES.BBS windows.
ΓòÉΓòÉΓòÉ 1.32. MPM_SaveFilesBBS(area tag) ΓòÉΓòÉΓòÉ
Saves the FILES.BBS for 'area tag'. Should be used after any changes are made
to a FILES.BBS window. area tag MUST be open.
ΓòÉΓòÉΓòÉ 1.33. MPM_SetWindowState([area tag, ]'MAXIMIZE | MINIMIZE | RESTORE') ΓòÉΓòÉΓòÉ
Sets the state of a window. If 'area tag' is ommitted, the File Area Window is
set, otherwise, the state of the FILES.BBS window 'area tag' will be set.
The possible window states are; MAXIMIZE, MINIMIZE or RESTORE, only one may be
specified per call to this function. Examples:
rc = MPM_SetWindowState('MINIMIZE')
Would minimize the File Area window to either the
desktop or Minimized Window viewer, depending on
your object settings.
rc = MPM_SetWindowState('1' ,'RESTORE')
Would restore the FILES.BBS window associated with
file area '1' to its previous state.
ΓòÉΓòÉΓòÉ 1.34. MPM_Crc32('filename') ΓòÉΓòÉΓòÉ
Examines 'filename' and returns a CRC32 value calculated according to FIPS PUB
71 and FED-STD-1003. This should prove useful for rolling your own TIC
processor.
ΓòÉΓòÉΓòÉ 1.35. MPM_ExecPgm(title, program, arguments [, "WAIT | NOWAIT"]) ΓòÉΓòÉΓòÉ
Starts another program session. title is the text that will be displayed in the
title bar of the session. program is the name of the executable file. arguments
are the command line parameters you want to pass to the program. The last
argument is optional, if it is present and is 'WAIT' MaxFile/PM will wait until
the program has finished running before returning control to your REXX script.
The return value will be the return code from the program if run with the
'WAIT' parameter, or the return code from DosStartSession() if run
asynchronously.
Please Note: if you wish to do any command line redirection you must pass the
correct command processor as the program (CMD.EXE, COMMAND.EXE, etc..) and pass
the name of the executable you want to run as part of the arguments.
ΓòÉΓòÉΓòÉ 1.36. MPM_ExtractFromArc(filename, filespec(s), filepath) ΓòÉΓòÉΓòÉ
Extracts filespec(s) from filename into the directory filepath. filename should
be a fully qualified filename. filepath MUST exist.