Batch file -- you can use it to find the best scores

General discussion on MAME, MARP, or whatever else that doesn't belong in any of the other forums

Moderators: mahlemiut, seymour, QRS

Post Reply
User avatar
mike_myers
Button Masher
Button Masher
Posts: 61
Joined: Sat Dec 20, 2003 10:38 pm
Contact:

Batch file -- you can use it to find the best scores

Post by mike_myers »

HISCORE.BAT

Code: Select all

@echo off
  SET HISCORE=
  SET ROM=
  if "%1"=="" goto help  
:: Find best score of a game
:: check /ROM option (it doesn't mind if you typed /rom , /RoM ,...)
  echo ' %1 ' | find " /ROM " /i > NUL
  if not errorlevel 1 SET ROM=1
  if not "%ROM%"=="" goto rom
  echo ' %2 ' | find " /ROM " /i > NUL
  if not errorlevel 1 SET ROM=2
  if not "%ROM%"=="" goto rom

:game
:: Find hiscore by name of the game (last column)
  if not "%HISCORE%"=="" SET HISCORE=%HISCORE% %1
  if "%HISCORE%"=="" SET HISCORE=%1
  shift
  if not "%1"=="" goto game
  find /i " : %HISCORE%" scores.htm | more
  goto finish

:rom
:: Find hiscore by name of the ROM (first column)
  IF "%ROM%"=="1" set HISCORE=%2
  IF "%ROM%"=="2" set HISCORE=%1
  if "%HISCORE%"=="" echo You didn't type the ROM.
  if "%HISCORE%"=="" goto fin  
  find /i " %HISCORE% :" scores.htm | more
  goto finish

:help
:: The help
  echo You can use this to search the best scores. If you don't search
  echo by ROM, you can get several games (example: Space Invaders).
  echo.
  echo HISCORE game_name
  echo HISCORE /ROM rom_name
  echo HISCORE rom_name /ROM
  echo.
  echo Options:
  echo /ROM : You search by rom name instead of game name.
  echo.
  echo Examples:
  echo HISCORE /ROM strhoop
  echo HISCORE strhoop /ROM
  echo HISCORE street hoop
  echo HISCORE donkey kong
  echo HISCORE PACMAN /rom
  echo.
  goto finish

:finish
  SET HISCORE=
  SET ROM=
PD: Download the file http://marp.retrogames.com/txt/scores.htm before using this. :wink:
Image
Post Reply