home *** CD-ROM | disk | FTP | other *** search
- /* parse command line */
- /* To use this with MegaD, add an ARexx Program Control that will call this
- Drag select a few files in an open directory window, select a ARexx button
- that will call this script.
-
- It will display each selected item in the console window that will open.
- The program has little value except for demonstrating how to parse
- information sent from MegaD. See @{" OpenSE.rexx " link "OpenSE.rexx"} for
- another example.
- */
-
- /* open output to MegaD screen */
- CALL CLOSE 'STDOUT'
- CALL OPEN 'STDOUT','con:0/12/640/100/MegaD RX/SCREEN MEGAD', 'W'
-
- arguments = ARG(1)
- /* test for quote at first of name */
- DO WHILE arguments ~= ""
-
- /* if it starts with a Quote it ends with a Quote */
- delim = " " /* default to space as a delimiter */
- IF LEFT(arguments,1) = '"' THEN delim = '"'
- ELSE arguments = " " || arguments /* add space to front */
- PARSE VAR arguments (delim) filename (delim) arguments
- filename = STRIP(filename)
- arguments = STRIP(arguments,L)
- SAY filename
- END
-
- value = Delay(5 * 50) /* Five second delay to see window on MegaD screen */
-