home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaMiscModsCD3.iso / _PROGRAMME / TOOLS / PSID_EX_ED.lha / psid_tools / PSID_extract < prev    next >
Encoding:
Text File  |  1997-03-27  |  872 b   |  36 lines

  1. /****************************************
  2.  PlaySID One-file extracter v1.0
  3.  April 97, Mikael Lund
  4.  
  5.  Extracts Author & copyright info, and
  6.  saves this in the filenote:
  7.  AUTHOR, ©COPYRIGHT
  8.  
  9.  Usage: Rx PSidEX name
  10.  ****************************************/
  11. parse arg fil
  12. fil=compress(fil,'"')
  13.  
  14. open(psid,fil);str.0=readch(psid,22)
  15. note=str.1=str.2=str.3=""
  16. if upper(left(str.0,4))~="PSID" then exit
  17.  
  18. str.1=compress(readch(psid,32),x2c(0))
  19. str.2=compress(readch(psid,32),x2c(0))
  20. str.3=compress(readch(psid,32),x2c(0))
  21.  
  22. note=str.2", ©"str.3
  23. if upper(str.2)=upper(str.3) then str.3=""
  24. if pos("?",str.2)=1 then str.2=""
  25. if pos("?",str.2)=2 then str.2=""
  26. if pos("?",str.3)=1 then str.3=""
  27. if pos("?",str.3)=2 then str.3=""
  28.  
  29. if str.2="" then note="©"str.3
  30. if str.3="" then note=str.2
  31. if note="" then exit
  32. say note
  33. address command 'filenote "'fil'" "'note'" >NIL:'
  34. close(psid)
  35. /**/
  36.