home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 25 / amigaformatcd25.iso / websites / asimware / techsupport / files / asimcdfs_arexxsamples.lha / ARexx_Samples / DiscChanger / cdda_track_length.rexx < prev    next >
OS/2 REXX Batch file  |  1995-08-23  |  606b  |  40 lines

  1. /*  This example will demonstrate the use of the cdda_track_length command
  2.     in DiscChanger.
  3.  
  4.     (C)1995 Asimware Innovations Inc.                             */
  5.  
  6.  
  7. options results
  8. address "DiscChanger_ARexx"
  9.  
  10.  
  11. cdda_first_track
  12. if rc ~= 0 then do
  13.     say 'Failed with 'rc'.'
  14.     exit
  15. end
  16. first = result
  17.  
  18. cdda_last_track
  19. if rc ~= 0 then do
  20.     say 'Failed with 'rc'.'
  21.     exit
  22. end
  23. last = result
  24.  
  25. say 'Audio CD has 'last-first' tracks.  'first' to 'last'.'
  26. say
  27.  
  28.  
  29. do i = first to last
  30.     cdda_track_length i
  31.  
  32.     if rc ~= 0 then do
  33.         say 'Failed with 'rc'.'
  34.         exit
  35.         end
  36.  
  37.     say 'Track 'i' is 'result' frames long.'
  38.     end
  39. exit
  40.