Guest User

Untitled

a guest
Jan 16th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. ;----------------------------------------------------------------------------
  2. ; MAME
  3. ; MAME .140
  4. ; by BBB
  5. ; 1.0
  6. ;
  7. ; Info:
  8. ; Since MAME needs to save hi scores and data on exit, then we can\'t force
  9. ; MAME closed with a hotkey. So make sure you have your own exit key setup
  10. ; in MAME first. We will leave the CloseProcess section below blank, but
  11. ; it is still required.
  12. ;
  13. ;----------------------------------------------------------------------------
  14. Runwait, %executable% %romName%, %emuPath%, Hide UseErrorLevel
  15.  
  16. if(ErrorLevel != 0){
  17. if (ErrorLevel = 1){
  18. Error = Failed Validity
  19. }else if(ErrorLevel = 2){
  20. Error = Missing Files
  21. }else if(ErrorLevel = 3){
  22. Error = Fatal Error
  23. }else if(ErrorLevel = 4){
  24. Error = Device Error
  25. }else if(ErrorLevel = 5){
  26. Error = Game Does Not Exist
  27. }else if(ErrorLevel = 6){
  28. Error = Invalid Config
  29. }else if(ErrorLevel = 7 || ErrorLevel = 8 || ErrorLevel = 9){
  30. Error = Identification Error
  31. }else{
  32. Error = Mame Error
  33. }
  34. MsgBox Mame Error - %Error%
  35. }
  36.  
  37. ExitApp
  38.  
  39. ;Required
  40. CloseProcess:
  41. ;Doesnt have to do anything but make sure to have the line before and after this line.
  42. ExitModule()
  43. return
  44.  
  45.  
  46. HaltEmu:
  47. WinMinimize, ahk_class %EmulatorClass%,,Hyperspin
  48. return
  49. RestoreEmu:
  50. loop{
  51. WinActivate, ahk_class %EmulatorClass%,,Hyperspin
  52. IfWinActive, ahk_class %EmulatorClass%,,Hyperspin
  53. {
  54. break
  55. }
  56. sleep, 100
  57. }
  58. return
  59. MultiGame:
  60. return
Add Comment
Please, Sign In to add comment