home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / REXMENU2.ZIP / SOLITAIR.CMD < prev    next >
OS/2 REXX Batch file  |  1992-10-27  |  1KB  |  31 lines

  1. /* Solitair.cmd - Example RexxMenu script to choose personal configuration for
  2.  *                a game of KLONDIKE solitaire.  User configurations are stored
  3.  *                in NAME.SOL files.
  4.  */
  5.  
  6. /* Build File of all NAME.SOL players */
  7. '@dir *.SOL /b > SolNames.tmp'
  8. /* Add Name for New Player */
  9. '@echo New Player.sol >> SolNames.tmp'
  10.  
  11. /* Get choice from RexxMenu for player name */
  12. if 1 = RxFuncQuery('RexxMenu') then
  13.    CALL RxFuncAdd 'RexxMenu', 'RexxMenu', 'RexxMenu'
  14. PlayerName = RexxMenu('SolNames.tmp','/Suf','.SOL',,
  15.                       '/Init','New Player','/Esc',,
  16.                       '/Prompt','Choose solitaire player option (Esc for none):')
  17. '@del SolNames.tmp'
  18. '@cls'
  19. if PlayerName = 'New Player' then do
  20.    say 'What is your name, New Player?'
  21.    PULL PlayerName
  22. end  /* Do */
  23. if \(PlayerName = '') then do
  24.    '@if exist KLONDIKE.INI del KLONDIKE.INI'
  25.    '@if exist' INSERT(PlayerName,'.SOL') 'copy' INSERT(PlayerName,'.SOL') 'KLONDIKE.INI'
  26.    'KLONDIKE.EXE'
  27.    '@if exist KLONDIKE.INI copy KLONDIKE.INI' INSERT(PlayerName,'.SOL')
  28. end  /* Do */
  29.  
  30. EXIT
  31.