home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / CDRom / asimcd30.dms / in.adf / ARexx_Samples / AsimTunes / get_disc_length.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-06-17  |  458 b   |  26 lines

  1. /*  This example will demonstrate the use of the get_disc_length command
  2.     in AsimTunes.
  3.  
  4.     (C)1993-1995 Asimware Innovations Inc.                               */
  5.  
  6.  
  7. options results
  8.  
  9. address "AsimTunes_ARexx"
  10.  
  11. get_disc_length
  12. if rc ~= 0 then do
  13.     say 'Failed with 'rc'.'
  14.     exit
  15. end
  16.  
  17.  
  18. total_secs = result
  19. say 'Audio CD is' total_secs 'seconds long.'
  20.  
  21. minute = trunc(total_secs / 60)
  22. seconds = total_secs // 60
  23. say 'In MM:SS, this is 'minute':'seconds
  24.  
  25. exit
  26.