Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for cdpclean.cmd

(view source code of cdpclean.cmd as plain text)

  1. /*
  2.  ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  3.  º CDPclean:    Removes all IMMCDDiscResumePosition entries from CDP.INI     º
  4.  º Written by Rob van der Woude                                              º
  5.  º Latest revision:   1999/08/02                                             º
  6.  º This program is used to remove all IMMCDDiscResumePosition entries from   º
  7.  º CDP.INI, the INI file of OS/2's (MMOS2) audio CD player.                  º
  8.  º This prevent the CD player from starting somewhere in the middle of a     º
  9.  º song when you previously stopped the player at that point.                º
  10.  º Please feel free to use, distribute and modify this program.              º
  11.  º However, do so entirely at your own risk.                                 º
  12.  º The author cannot be held responsible for any damage or loss of data,     º
  13.  º caused by the use or inability to use this program.                       º
  14.  º If you modify this program, please document the modifications.            º
  15.  º I would also like to receive an e-mail message stating the nature of the  º
  16.  º modifications.                                                            º
  17.  ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  18. */
  19.  
  20. /* Initialize RexxUtil */
  21. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  22. call SysLoadFuncs
  23.  
  24. /* Find full path to MMOS2's CD Player's INI files */
  25. mmbase = value( "MMBASE", , "OS2ENVIRONMENT" )
  26. mmbase = strip( strip( mmbase, "T", ";" ), "T", "\" )
  27. cdpini = mmbase||"\CDP.INI"
  28.  
  29. /* Check if CDP.INI exists */
  30. call SysFileTree cdpini, "found.", "F", , "**---"
  31. if found.0 <> 1 then do
  32. 	call SysCls
  33. 	say ""
  34. 	call beep 880, 250
  35. 	say " ERROR: file "||cdpini||" not found."
  36. 	say ""
  37. 	exit
  38. end
  39.  
  40. /* Find IMMCDDiscResumePosition entries and remove them */
  41. call SysIni cdpini, "ALL:", "cdlist."
  42. do i=1 to cdlist.0
  43. 	call SysIni cdpini, cdlist.i, "ALL:", "cdlist."i"."
  44. 	drespos = SysIni( cdpini, cdlist.i, "IMMCDDiscResumePosition" )
  45. 	if drespos <> "ERROR:" then do
  46. 		call SysIni cdpini, cdlist.i, "IMMCDDiscResumePosition", "DELETE:"
  47. 		drespos = SysIni( cdpini, cdlist.i, "IMMCDDiscResumePosition" )
  48. 		if drespos <> "ERROR:" then do
  49. 			say "["||SysIni( cdpini, cdlist.i, "IMMCDDiscTitle" )||"]"
  50. 			say "Error removing IMMCDDiscResumePosition entry"
  51. 			say ""
  52. 		end
  53. 	end
  54. end
  55.  

page last modified: 2024-04-16; loaded in 0.0061 seconds