home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / mpm1_28.zip / mpmrexx.inf (.txt) < prev    next >
OS/2 Help File  |  1995-10-05  |  16KB  |  439 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. REXX Extensions ΓòÉΓòÉΓòÉ
  3.  
  4. This section details each of the REXX extensions added by MaxFile/PM. 
  5.  
  6.  
  7. ΓòÉΓòÉΓòÉ 1.1. MPM_GetVersion() ΓòÉΓòÉΓòÉ
  8.  
  9. Returns MaxFile/PM's revision or version number. 
  10.  
  11.  
  12. ΓòÉΓòÉΓòÉ 1.2. MPM_ClearWindow() ΓòÉΓòÉΓòÉ
  13.  
  14. Clears the REXX output window. 
  15.  
  16.  
  17. ΓòÉΓòÉΓòÉ 1.3. MPM_MsgBox(message, title) ΓòÉΓòÉΓòÉ
  18.  
  19. Displays a simple message box using 'message' as the text displayed in the 
  20. message box and 'title' as the title for the message box. 
  21.  
  22.  
  23. ΓòÉΓòÉΓòÉ 1.4. MPM_QueryArea([area tag]) ΓòÉΓòÉΓòÉ
  24.  
  25. Works in two different ways. Called with no arguments it returns the area tag 
  26. of the first file area listed in the Main File Area window listing. When called 
  27. with a single argument containing the area tag of an existing file area, it 
  28. will return the area tag of the NEXT file area in the list. In either case, if 
  29. an area can't be found it returns 'ERROR'. 
  30.  
  31.  
  32. ΓòÉΓòÉΓòÉ 1.5. MPM_QueryAreaList('stemvar') ΓòÉΓòÉΓòÉ
  33.  
  34. Creates a compound stem variable containing the area tag, description, download 
  35. path and the full path/filename of the FILES.BBS for each area. 
  36.  
  37. The stem variable name is passed to the function as a string. stemvar.0 
  38. contains the total number of areas that information has been returned for. 
  39.  
  40. An example of how to use this function follows: 
  41.  
  42.   /* MPM_QueryAreaList() example */
  43.   rc = MPM_QueryAreaList('arealist')
  44.  
  45.   Say arealist.0' items in Area List.'
  46.   Say arealist.1.area' is the first area.'
  47.   Say arealist.1.desc' is the first area description.'
  48.   Say arealist.1.path' is the first area download path.'
  49.   Say arealist.1.fbbs' is the first area FILES.BBS location.'
  50.  
  51.  
  52. ΓòÉΓòÉΓòÉ 1.6. MPM_QueryAreaInfo(area tag, '0' | '1' | '2') ΓòÉΓòÉΓòÉ
  53.  
  54. Queries and returns the specified information for 'area tag.' The level info is 
  55. as follows: 
  56.  
  57.   0 - Area description
  58.   1 - Download Path
  59.   2 - FILES.BBS Location
  60.  
  61.  
  62. ΓòÉΓòÉΓòÉ 1.7. MPM_DeselectArea([area tag]) ΓòÉΓòÉΓòÉ
  63.  
  64. Detags a file area in the Main File Area window. If area tag is ommitted the 
  65. selection emphasis is removed from all items in the window. 
  66.  
  67.  
  68. ΓòÉΓòÉΓòÉ 1.8. MPM_SelectArea(area tag) ΓòÉΓòÉΓòÉ
  69.  
  70. Tags a file area in the Main File Area Window. 
  71.  
  72.  
  73. ΓòÉΓòÉΓòÉ 1.9. MPM_OpenArea(area tag) ΓòÉΓòÉΓòÉ
  74.  
  75. Opens the FILES.BBS Window associated with 'area tag'. If this function returns 
  76. 'OK' the window _IS_ open, v. the old behaviour of just letting you know the 
  77. message to open the window got posted okay. 
  78.  
  79.  
  80. ΓòÉΓòÉΓòÉ 1.10. MPM_CloseArea(area tag) ΓòÉΓòÉΓòÉ
  81.  
  82. Closes the FILES.BBS window associated with 'area tag.' 
  83.  
  84.  
  85. ΓòÉΓòÉΓòÉ 1.11. MPM_IsAreaOpen(area tag) ΓòÉΓòÉΓòÉ
  86.  
  87. Returns "1" if the FILES.BBS window associated with 'area tag' is open, "0" 
  88. otherwise. 
  89.  
  90.  
  91. ΓòÉΓòÉΓòÉ 1.12. MPM_AllFilesList() ΓòÉΓòÉΓòÉ
  92.  
  93. Starts up the All Files List generator in interactive mode, the list generated 
  94. will be made up of the file areas that are selected in the File Area window. 
  95. Use MPM_SelectArea() and MPM_DeselectArea() to select areas from REXX. 
  96.  
  97.  
  98. ΓòÉΓòÉΓòÉ 1.13. MPM_OutDated(days, 'MOVE | KILL', areatag) ΓòÉΓòÉΓòÉ
  99.  
  100. Performs an outdated file scan on the selected file areas in the File Area 
  101. window based on the arguments passed. All three arguments MUST be present. 
  102.  
  103. days is the number of days old a file can be, anything older than days will 
  104. either be deleted or moved. 
  105.  
  106. MOVE | KILL selects whether you want the files MOVEd or KILLed. If you want 
  107. files moved, areatag must contain the area tag or name (case MUST match) of an 
  108. existing file area. 
  109.  
  110. When KILL is selected the areatag is ignored, but it still MUST be present. 
  111.  
  112.  
  113. ΓòÉΓòÉΓòÉ 1.14. MPM_SetFDUFlag(area tag) ΓòÉΓòÉΓòÉ
  114.  
  115. Sets the File Database Utility flag for the FILES.BBS that is associated with 
  116. 'area tag.' Use this to tell MaxFile/PM that the File Database Utility needs to 
  117. be run to update your file database after making changes that MaxFile/PM 
  118. doesn't know about. 
  119.  
  120.  
  121. ΓòÉΓòÉΓòÉ 1.15. MPM_QueryFile(area tag[, filename]) ΓòÉΓòÉΓòÉ
  122.  
  123. Returns the base filename of a file from a FILES.BBS window. When called with 
  124. just the area tag of an open window it returns the first file in the window. 
  125. When called with both the area tag and an existing filename it will return the 
  126. NEXT filename in the window. If something goes wrong it returns ERROR. 
  127.  
  128.  
  129. ΓòÉΓòÉΓòÉ 1.16. MPM_QueryFileList(area tag, 'stemvar') ΓòÉΓòÉΓòÉ
  130.  
  131. Creates a compound stem variable containing a list of all the files in the 
  132. FILES.BBS associated with 'area tag'. The stem variable name is passed as a 
  133. string to the function. stemvar.0 contains how many items are in the list. 
  134.  
  135. An example follows: 
  136.  
  137.   /* MPM_QueryFileList() example */
  138.   mpmarea = 'TEST'
  139.  
  140.   /* Open up the file area */
  141.   retval = MPM_OpenArea(mpmarea)
  142.  
  143.   If MPM_IsAreaOpen(mpmarea) = '0' then Exit
  144.  
  145.   rc = MPM_QueryFileList(mpmarea, 'files')
  146.  
  147.   rc = MPM_CloseArea(mpmarea)
  148.  
  149.   Say 'There are 'files.0' files in the list.'
  150.   Say
  151.   Say files.1.file' is the first file.'
  152.   Say files.1.path' is the path of the first file.'
  153.   Say files.1.desc' is the description of the first file.'
  154.  
  155.  
  156. ΓòÉΓòÉΓòÉ 1.17. MPM_QueryFileInfo(area tag, filename, '0' | '1' | '2' | '3') ΓòÉΓòÉΓòÉ
  157.  
  158. Queries and returns the specified information about 'filename.' 
  159.  
  160. The level information is as follows: 
  161.  
  162.   0 - File Path
  163.   1 - File Date in DD MMM YYYY format
  164.   3 - File Size
  165.   4 - File Description
  166.  
  167.  
  168. ΓòÉΓòÉΓòÉ 1.18. MPM_SelectFile(area tag, filename) ΓòÉΓòÉΓòÉ
  169.  
  170. Select 'filename' in the area identified by 'area tag'. 
  171.  
  172.  
  173. ΓòÉΓòÉΓòÉ 1.19. MPM_DeselectFile(area tag, filename) ΓòÉΓòÉΓòÉ
  174.  
  175. Deselect 'filename' in the area identified by 'area tag'. 
  176.  
  177.  
  178. ΓòÉΓòÉΓòÉ 1.20. MPM_SetFileInfo(area tag, filename, '0' | '1' | '2') ΓòÉΓòÉΓòÉ
  179.  
  180. Set the displayed information for a file in a FILES.BBS window. 
  181.  
  182. The level information is as follows: 
  183.  
  184.   0 - Set File Date
  185.   1 - Set File Size
  186.   2 - Set Description
  187.  
  188. Note:  options 0 and 1 are only for display purposes, if you want to set the 
  189. file's date ("touch" it) you need to perform this yourself, MaxFile/PM does not 
  190. do this for you, the same goes for the file's size. This REXX extension is 
  191. merely to update the display in the FILES.BBS window. Option 2, for setting 
  192. descriptions, does actually alter the description that will get saved for the 
  193. file. 
  194.  
  195. Dates should be in the format DD MMM YYYY, E.G: 01 Dec 1993. Sizes should be 
  196. unformatted with no thousands separators. 
  197.  
  198.  
  199. ΓòÉΓòÉΓòÉ 1.21. MPM_RemoveFile(area tag, filename) ΓòÉΓòÉΓòÉ
  200.  
  201. Removes the file 'filename' from the FILES.BBS window associated with 'area 
  202. tag'. 
  203.  
  204.  
  205. ΓòÉΓòÉΓòÉ 1.22. MPM_AddFile(area tag, filename, description) ΓòÉΓòÉΓòÉ
  206.  
  207. Adds 'filename' with description to the FILES.BBS window associated with 'area 
  208. tag'. 'filename' MUST be a FULL file specification in the form of 
  209. D:\PATH\FILENAME.EXE! The function returns 'ERROR' if something goes wrong. 
  210.  
  211.  
  212. ΓòÉΓòÉΓòÉ 1.23. MPM_AnnounceFiles('stemvar') ΓòÉΓòÉΓòÉ
  213.  
  214. Creates a file announcement message and writes it to a Squish or *.MSG message 
  215. base. The message is built from the information stored in the compound stem 
  216. variable 'stemvar'. 
  217.  
  218. Please see TANN.CMD (included in the distribution archive) for an example of 
  219. how to use this extension. 
  220.  
  221. The elements of the message that need to be placed in 'stemvar' are as follows: 
  222.  
  223.  
  224.  stemvar.msgpath      is the root path of the message area to
  225.                       place the message in.
  226.  
  227.  stemvar.msgproc      is the executable name and switches
  228.                       needed to run your mail tosser/packer,
  229.                       this one is optional, if it isn't
  230.                       defined it is ignored.
  231.  
  232.  stemvar.msgtype      this defines the type of message base
  233.                       and must be one of: SQUISH, MSG or
  234.                       MSGECHO.
  235.  
  236.  stemvar.msgflag      is the message flag you want to use for
  237.                       this message, it must be one of: HOLD,
  238.                       NORMAL, CRASH or DIRECT.
  239.  
  240.  stemvar.to           is the name to address the message to,
  241.                       if it isn't defined it defaults to
  242.                       'All'.
  243.  
  244.  stemvar.toaddr       this the Fidonet style address of the
  245.                       recipient of the message. It must be in
  246.                       the format Zone:Net/Node.Point, I.E,
  247.                       1:201/60.0, if not defined it defaults
  248.                       to stemvar.fromaddr.
  249.  
  250.  stemvar.from         is the name the message is from, this
  251.                       one is required.
  252.  
  253.  stemvar.fromaddr     is the address of who the message is
  254.                       from, in other words, the originating
  255.                       Fidonet address. This one is also
  256.                       required.
  257.  
  258.  stemvar.subject      this gets put in the subject field of
  259.                       the message. If not defined it defaults
  260.                       to 'File Announcement'.
  261.  
  262.  stemvar.header       is the header of the message, it gets
  263.                       placed just before the file list in the
  264.                       message. This one is optional. 1024
  265.                       character limit.
  266.  
  267.  stemvar.footer       this is similar to the header, except it
  268.                       comes after the file list in the
  269.                       message. It is also optional. 1024
  270.                       character limit.
  271.  
  272.  stemvar.origin       this is the text that will get put in
  273.                       the origin line of the message. The " *
  274.                       Origin: " and from fidonet address are
  275.                       taken care for you. All you need to
  276.                       enter here is what text you want added
  277.                       in between the two. This is optional, if
  278.                       it is not defined no origin line is
  279.                       generated.
  280.  
  281.  stemvar.0            contains the number files being
  282.                       announced.
  283.  
  284.  stemvar.x.file       this is the base filename of a file to
  285.                       announce.
  286.  
  287.  stemvar.x.path       is the drive and path to the above base
  288.                       filename. Do NOT include the filename
  289.                       here.
  290.  
  291.  stemvar.x.desc       this is the description you want to use
  292.                       for this file in the message. 1024
  293.                       character limit.
  294.  
  295. 'x' in the above three is a place holder for each of the files that you want 
  296. announced, up to stemvar.0 files. 
  297.  
  298.  
  299. ΓòÉΓòÉΓòÉ 1.24. MPM_FileAreaSort(area tag, 'Name|Date|Size|Desc', 'Asc|Desc'[, 'All']) ΓòÉΓòÉΓòÉ
  300.  
  301. Sorts the file area 'area tag' by; Name, Date, Size or Desc. In either 
  302. ascending or descending order, optionally deselecting all highlighted files. 
  303.  
  304. This function behaves just like the menu options on the FILES.BBS context menu, 
  305. if any items are selected ONLY those items are sorted. If you want to sort the 
  306. entire area make sure you pass the fourth argument 'All' to it. 
  307.  
  308. Here are a few examples: 
  309.  
  310.   rc = MPM_FileAreaSort('0', 'Name', 'Asc')
  311.  
  312.     Sorts area 0 by name in ascending order.
  313.  
  314.   rc = MPM_FileAreaSort('FWBBS', 'Date', 'Desc')
  315.  
  316.     Sorts area FWBBS by date in descending order.
  317.  
  318.   rc = MPM_FileAreaSort('FWCOMM', 'Date', 'Desc', 'All')
  319.  
  320.     Sorts area FWCOMM by date in descending order, first
  321.     deselecting all selected files.
  322.  
  323.  
  324. ΓòÉΓòÉΓòÉ 1.25. MPM_AdoptFiles(area tag) ΓòÉΓòÉΓòÉ
  325.  
  326. Performs an adopt on all orphaned files in the file area 'area tag'. area tag 
  327. MUST be open. 
  328.  
  329.  
  330. ΓòÉΓòÉΓòÉ 1.26. MPM_ReArchive(area tag, archivetype) ΓòÉΓòÉΓòÉ
  331.  
  332. Rearchives all selected files in the area 'area tag' to 'archivetype'. area tag 
  333. MUST be open. 
  334.  
  335. archivetype should be one of: 
  336.  
  337.   ZIP
  338.   ARJ
  339.   LZJ
  340.   ARC
  341.   HA
  342.   RAR
  343.   UC2
  344.   ZOO
  345.  
  346.  
  347. ΓòÉΓòÉΓòÉ 1.27. MPM_PurgeDupes(area tag) ΓòÉΓòÉΓòÉ
  348.  
  349. Scans through the file area 'area tag' and removes all duplicate file entries. 
  350. area tag MUST be open. 
  351.  
  352.  
  353. ΓòÉΓòÉΓòÉ 1.28. MPM_RemoveMissingFiles(area tag) ΓòÉΓòÉΓòÉ
  354.  
  355. Scans through the file area 'area tag' and removes all entries for files that 
  356. do not exist. area tag MUST be open. 
  357.  
  358.  
  359. ΓòÉΓòÉΓòÉ 1.29. MPM_CleanseDescriptions(area tag) ΓòÉΓòÉΓòÉ
  360.  
  361. Cleanses the descriptions for all selected files in the area 'area tag'. area 
  362. tag MUST be open. 
  363.  
  364.  
  365. ΓòÉΓòÉΓòÉ 1.30. MPM_GetDIZFiles(area tag) ΓòÉΓòÉΓòÉ
  366.  
  367. Attempts to extract and use FILE_ID.DIZ, DESC.SDI or SDN.ID for the selected 
  368. files in the area 'area tag'. area tag MUST be open. 
  369.  
  370.  
  371. ΓòÉΓòÉΓòÉ 1.31. MPM_QueryFilesBBS(area tag, stemvar) ΓòÉΓòÉΓòÉ
  372.  
  373. Returns the FILES.BBS for 'area tag' in the compound stem variable 'stemvar'. 
  374. area tag does not have to be open, but if it is, make sure you save the 
  375. FILES.BBS before you call this function. 'ERROR' is returned if an error occurs 
  376. or there are no entries in the FILES.BBS file. 
  377.  
  378. stemvar.0 will contain the number of entries. 
  379.  
  380. stemvar.1 - stemvar.x will each contain one entry from the FILES.BBS. The 
  381. FILES.BBS will be parsed according to your settings for Extended Description 
  382. Marker, FileList Margin, File Headers and Header Size. In general, each string 
  383. is formatted just like the entries you view in your FILES.BBS windows. 
  384.  
  385.  
  386. ΓòÉΓòÉΓòÉ 1.32. MPM_SaveFilesBBS(area tag) ΓòÉΓòÉΓòÉ
  387.  
  388. Saves the FILES.BBS for 'area tag'. Should be used after any changes are made 
  389. to a FILES.BBS window. area tag MUST be open. 
  390.  
  391.  
  392. ΓòÉΓòÉΓòÉ 1.33. MPM_SetWindowState([area tag, ]'MAXIMIZE | MINIMIZE | RESTORE') ΓòÉΓòÉΓòÉ
  393.  
  394. Sets the state of a window. If 'area tag' is ommitted, the File Area Window is 
  395. set, otherwise, the state of the FILES.BBS window 'area tag' will be set. 
  396.  
  397. The possible window states are; MAXIMIZE, MINIMIZE or RESTORE, only one may be 
  398. specified per call to this function. Examples: 
  399.  
  400.   rc = MPM_SetWindowState('MINIMIZE')
  401.  
  402.     Would minimize the File Area window to either the
  403.     desktop or Minimized Window viewer, depending on
  404.     your object settings.
  405.  
  406.   rc = MPM_SetWindowState('1' ,'RESTORE')
  407.  
  408.     Would restore the FILES.BBS window associated with
  409.     file area '1' to its previous state.
  410.  
  411.  
  412. ΓòÉΓòÉΓòÉ 1.34. MPM_Crc32('filename') ΓòÉΓòÉΓòÉ
  413.  
  414. Examines 'filename' and returns a CRC32 value calculated according to FIPS PUB 
  415. 71 and FED-STD-1003. This should prove useful for rolling your own TIC 
  416. processor. 
  417.  
  418.  
  419. ΓòÉΓòÉΓòÉ 1.35. MPM_ExecPgm(title, program, arguments [, "WAIT | NOWAIT"]) ΓòÉΓòÉΓòÉ
  420.  
  421. Starts another program session. title is the text that will be displayed in the 
  422. title bar of the session. program is the name of the executable file. arguments 
  423. are the command line parameters you want to pass to the program. The last 
  424. argument is optional, if it is present and is 'WAIT' MaxFile/PM will wait until 
  425. the program has finished running before returning control to your REXX script. 
  426.  
  427. The return value will be the return code from the program if run with the 
  428. 'WAIT' parameter, or the return code from DosStartSession() if run 
  429. asynchronously. 
  430.  
  431. Please Note:  if you wish to do any command line redirection you must pass the 
  432. correct command processor as the program (CMD.EXE, COMMAND.EXE, etc..) and pass 
  433. the name of the executable you want to run as part of the arguments. 
  434.  
  435.  
  436. ΓòÉΓòÉΓòÉ 1.36. MPM_ExtractFromArc(filename, filespec(s), filepath) ΓòÉΓòÉΓòÉ
  437.  
  438. Extracts filespec(s) from filename into the directory filepath. filename should 
  439. be a fully qualified filename. filepath MUST exist.