home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 2
/
FFMCD02.bin
/
new
/
amigalibdisks
/
disk939
/
upcat
/
printlong.upcat
< prev
next >
Wrap
Text File
|
1993-12-21
|
2KB
|
70 lines
/*-----------------------------------------------------------------------*/
/* Example ARexx macro PrintLong for Upcat. */
/* */
/* This macro prints the files of the catalog in long format. */
/* The current Display of Upcat must be 'Files - xxxx sorted'. */
/* */
/* You may adapt this macro or use parts of it for your own needs, but */
/* this macro must be distributed unchanged. */
/* */
/* Author : Frans Zuydwijk */
/* Date : 24 September 1993 */
/*-----------------------------------------------------------------------*/
Trace Off
Options Results /* Get information returned in Result */
"FirstSortFile"
If RC ~= 0
Then Do
Select
When RC = 5 Then Message = 'No files to print'
When RC = 11 Then Message = 'Display is not Files - xxxx sorted'
Otherwise Message = 'Error' RC 'from FirstSortFile'
End
"Requester" "Continue" Message
Exit
End
If Open('Printer', 'PRT:') = 0
Then Do
"Requester" "Continue" "Cannot open Printer"
Exit
End
If WriteCh('Printer', '1B'X || 'c') ~= 2 /* Reset */
Then Do
"Requester" "Continue" "Error writing to Printer"
Close('Printer')
Exit
End
Call WriteCh('Printer', '1B'X || '[4w') /* Condensed fine on */
Do While RC = 0
Parse Var Result Level '/' Type '/' Name '/' Size '/' Date '/' ,
Time '/' Protect '/' Categories '/' Comment
Line = Left(Name,30) Date Time Right(Size,8) Protect Comment
If Length(Line) > 132
Then Line = Left(Line, 132)
If WriteLn('Printer', Line) ~= Length(Line) + 1
Then Do
"Requester" "Continue" "Error writing to Printer"
Close('Printer')
Exit
End
"NextSortFile"
End
Call WriteCh('Printer', '1B'X || '[3w') /* Condensed fine off */
Close('Printer')
Exit