Jules,

Heh, if I had know that, I wouldn't have bothered writing the little
script I did ;-)  I still like it, though I never got around to
dispersing it among the fertile lands of the internet.  I've thrown
some kudos in, and made some "cleanup" and attatched it to this mail
as plain text.

/******************************/

/*MDMaster*/
/*$VER 1.0 November 2002, by David Crawford a.k.a. Targhan              */

/*Purpose*/
/*A work-around for the ARexx-menu bug in MicroDot-2.                   */
/*This script simply builds a requestor asking which other .mdrx file   */
/*that you wish to run.  No biggie :-)                                  */

/*Legal-Stuff*/
/*This program may be modified, changed, and given out freely, so long  */
/*as long as credit is given to the original author, David Crawford.    */

/*Thanks*/
/*   Neil Bothwick for the idea of using AmigaDOS's RequestChoice       */
/*   Ollie Wagner and the Vapor Team for creating MicroDot              */

/*Requires*/
/*RexxTricks.library, available from the AmiNet.                        */

/*Usage*/
/*Create a second directory in the MicroDot-2 drawer for ARexx scripts  */
/*Move current ARexx scripts to that directory. Suggested 'MDRexx'.     */
/*Edit the following line to contain the full path to the new directory.*/

MDREXXDIR = 'Netconnect3:programs/microdot2/MDRexx'

/* Save this script in the ORIGINAL REXX directory.                     */
/* Make any changes to MD's preferences, if you have an ARexx script    */
/* that is launched from a button.                                      */
/* Quit and restart MicroDot-2.                                         */

/* Avoid Editing beneath this line if you don't know what you're doing! */
address command
/*Library and Directory section*/
IF ~SHOW(LIBRARIES,'rexxtricks.library') THEN
   IF ~ADDLIB('rexxtricks.library',9,-30,38) THEN
      quit('Cannot open rexxtricks.library!',10) 

if ~getdir(mdrexxdir,'(#?.#?x)','list','FILES','NAME') then
    quit('error reading directory!',10)

if ~getdir(mdrexxdir,'(#?.#?x)','dolist','FILES','PATH') then
    quit('Error reading directory!',10)

/*Build ViewList*/
destvar.0 = 0
window.title          = 'Select ARexx Script'
window.gadgettext     = '_Launch|_Cancel'
window.font           = 'DEFAULT'
window.sort           = 'TRUE'
window.multiselect    = 'FALSE'

/*Call ViewList*/
CALL viewlist('list','window','destvar')

/*Main Loop*/
if (destvar.0 > 0) then do
   do i = 1 to destvar.0        /*find the chosen script*/
       mdcommand = destvar.i    /*set command           */
   end
   IF destvar.gadget = 1 then do
       marsaction = mdrexxdir || "/" || mdcommand
       ADDRESS REXX marsaction
       exit 0
       end
   end
else call ExitMsg('User Cancelled')

/* ExitMsg */
ExitMsg:
    parse arg msg
    address command 'RequestChoice >NIL: "MDMaster" "'msg'" "OK"'
    exit 0

/* End of Program */

/************/


-- 
--
Regards,

Dave 'Targhan' Crawford

Reply via email to