home *** CD-ROM | disk | FTP | other *** search
- /*----------------------------------------------------------------------------
- Arexx DiskLabel Maker
- This is an updated version of my label maker. It makes use of the
- REXXARPLIB.LIBRARY v2.1 intuition functions, and is a good, easy
- demo of how to use the basic functions of this library. It will
- not run unless you have this library (available on genie and compuserve).
- This program is set up to use the full size disk labels for 3 1/2" disks,
- it leaves the back side part blank. It was developed using a Panasonic
- KX-P1124 printer, ands the spacing works on it. As for other printers,
- you will have to try it out and adjust it if needed, but it should work
- for any standard printer. This program may be freely distributed, but please
- leave the credits intact.
-
- Tom Pennington 04/01/90
- -----------------------------------------------------------------------------*/
-
- numeric digits 4
- /*----------------------------------------------------
- get the system date as the default for the requestor
- ------------------------------------------------------*/
- address command 'date > ram:today'
- address
- status = open('infile','ram:today')
- full_date = readln('infile')
- status = close('infile')
- date_start = index(full_date,' ')
- now = substr(full_date,date_start+1,9)
- done = 'OKAY'
- /*-----------------------------------------------------------
- this uses the postmsg function to place an informational
- requestor on the screen. It does not return any user input
- to the program, it just displays the message text.
- --------------------------------------------------------------*/
- stat = postmsg(130,70,' Written By\ Tom Pennington')
- /*--------------------------------------------------------------------
- some type of timming loop is needed so that the message can be read
- ---------------------------------------------------------------------*/
- call wait 2
- stat = postmsg(130,70,' Using Arexx\ and RexxArpLibv2.1')
- call wait 2
- /*------------------------------------------------
- this clears the message requestor from the screen
- -------------------------------------------------*/
- stat = postmsg(130)
- do While done = 'OKAY'
- /*-------------------------------------------------------------------
- this calls the string requestor from the library, and allows
- for user input. If any fields are to be ignored, they must
- still have commas to designate their place in the call parameters
- ----------------------------------------------------------------------*/
- disks = request(120,60,'Enter the number of\disks in the saveset','1',,'quit')
- /*-----------------------------------
- this is simple data validation,
- you can't print Z labels or ( times
- ------------------------------------*/
- if disks < '1' then call cleanup
- if disks >= ':' then call cleanup
- ssname = request(120,60,'Enter the Volume Name','SYSTEM',,)
- series = request(120,60,'Enter the Volume Series','1',,)
- btype = request(120,60,'Enter the Backup Type','Full',,)
- dates = request(120,60,'Enter the Backup Date',now,,)
- /*---------------------------------------
- give them one last chance to chicken out
- ----------------------------------------*/
- confirm = request(120,60,'Ready to Print?',,'continue','abort')
- if confirm ~= 'OKAY' then call cleanup
- /*------------------------------------------------------
- open the prt: device as the output file and write to it
- using normal default printer settings, there are 18 lines
- of text on a standard 3 1/2 inch disk label.
- --------------------------------------------------------*/
- stat = open('outfile','prt:','W')
- do i = 1 to disks
- do h = 1 to 5
- stat = writeln('outfile',' ')
- end h
- stat = writeln('outfile','SaveSet Name: 'ssname)
- stat = writeln('outfile',' ')
- stat = writeln('outfile','Series: 'series)
- stat = writeln('outfile',' ')
- stat = writeln('outfile','Volume Number:' i)
- stat = writeln('outfile',' ')
- stat = writeln('outfile','Backup Type:' btype)
- stat = writeln('outfile',' ')
- stat = writeln('outfile','Date: ' dates)
- do h = 1 to 4
- stat = writeln('outfile',' ')
- end h
- end i
- done = request(120,60,'More Labels?',,'OKAY','QUIT')
- end
- call cleanup
-
- cleanup:
- stat = close('outfile')
- /*------------------------------
- get rid of temporary date file
- --------------------------------*/
- address command 'delete ram:today'
- exit
- /*==================================================
- this is a simple timming loop, it does nothing else
- it is like a wait command in any other language. To
- use it, call wait <seconds>
- ====================================================*/
- wait:
- parse arg duration
- end_time = time('S') + duration
- do while time('S') < end_time
- z = 1
- end
- return
-