home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Database / HF-ADM23.LHA / ADM / ARexx / Ausdruck / DruckeIDList.adm < prev    next >
Encoding:
Text File  |  1995-08-02  |  1.3 KB  |  64 lines

  1. /* $VER: Drucke_IDListe.adm 1.2 (22.1.95)
  2.  
  3.    Copyright 1995 Daniel Wicke, wicke@wpts0.physik.uni-wuppertal.de
  4.    
  5.    Druckt Adreßliste, sortiert nach IDs.
  6.    Für ADM.
  7.    
  8. */
  9. OPTIONS RESULTS
  10.  
  11. Kopfzeile='Numerisches Adressenverzeichnis'
  12. Kopfzeile=OVERLAY(DATUM(),Kopfzeile,87)
  13.  
  14. InitDrucker='#1p"zwwq'
  15. ExitDrucker=' '
  16.  
  17. MaxID=1
  18. MinID=1000000
  19. Activatefirst
  20.  
  21. DO FOREVER
  22.    GETADDRESS Adresse
  23.    if RESULT=-1 then leave
  24.  
  25.    /*say Adresse.lastname Adresse.id Adresse.flags*/
  26.    Zeile=RIGHT(Adresse.ID,5)
  27.    Zeile=OVERLAY(Adresse.lastname||", "Adresse.firstname,Zeile,7)
  28.    Zeile=OVERLAY(" "||Adresse.Address1,Zeile,38)
  29.    Zeile=OVERLAY(" "||Adresse.Postcode,Zeile,68)
  30.    Zeile=OVERLAY(" "||Adresse.City,Zeile,75)
  31.    Zeile=OVERLAY(" "||Adresse.Telephone,Zeile,91)
  32.    /*say Zeile*/
  33.  
  34.    N=Adresse.id
  35.  
  36.    if N>MaxID then MaxID=N
  37.    if N<MinID then MinID=N
  38.    
  39.    Buffer.N=Zeile
  40.  
  41.    ACTIVATENEXT
  42.    if RESULT=-1 then leave
  43. END
  44.  
  45. /*say MinID||","||MaxID */
  46.  
  47. IF 1=OPEN('Drucker','PRT:','W') THEN
  48. DO
  49.   len=WRITEln('Drucker',InitDrucker||Kopfzeile)
  50.   len=WRITEln('Drucker','')
  51.   do NO=MinID to MaxID
  52.     if LEFT(Buffer.NO,6) ~= "BUFFER" then
  53.     do
  54.       len=writeln('Drucker',Buffer.NO) 
  55.       /*say Buffer.NO*/
  56.     end
  57.   end
  58.   len=WRITECH('Drucker',ExitDrucker)   
  59.   len=CLOSE('Drucker')
  60. END
  61. ELSE
  62.    say "Konnte Drucker nicht öffnen."
  63.  
  64.