jdm001

JimmerScripts - HS Intro and Randomized Video Toggle

Jul 11th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; *******************************************************************************************
  2. ; This script requires you to make a .bat batch file named exactly:  clear_withrandomizer.bat
  3. ; It must be put in your HyperSpin root directory; and, change the directory below from the
  4. ; "D:\Arcade\" to your root directory location.
  5. ; You must change it throughout this script too below too, so I suggest using a Find/Replace All
  6. ; You need to create (right click blank area in windows and choose "new" and then "Windows batch file"
  7.  
  8. /* Start Batch File after this line:
  9.     @echo off
  10.     Echo Just in Case:
  11.     ECHO Clearing Game Cache Directory ...
  12.     rmdir cache /q /s
  13.     mkdir cache
  14.     Del D:\Arcade\Media\Frontend\Video\intro.flv
  15.     D:\Arcade\Media\Frontend\Video\swapit.bat
  16.     Echo Done!
  17.     exit
  18. End Batch File before this line */
  19.  
  20. ; Next, navigate to your HS Root directory \Media\Frontend\Video folder and make a new folder:  Intros
  21. ; Drop any .FLV intro videos in there, I recommend keeping them short so they are randomized quickly.
  22.  
  23. ; Lastly, you need to download this file swapit.bat and place it in your Media\Frontend\Video folder:
  24. ; https://pastebin.com/r1YGHMYZ
  25. ; This is the randomizer that is called on in the batch file you made above.
  26.  
  27. ; FINALLY - The actual script:
  28.  
  29. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  30. ; #Warn  ; Enable warnings to assist with detecting common errors.
  31. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  32. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  33.  
  34. ; This is to see if script is running in admin mode, won't work without, so it'll reopen in admin if it wasn't.
  35. if not A_IsAdmin
  36. {
  37.    Run *RunAs "%A_ScriptFullPath%"
  38.    ExitApp
  39. }
  40.  
  41.  
  42. ; Note, all dialog boxes have a 10 secocnd timeout for people on a machine without easy access to keyboard.
  43.  
  44.  
  45. MsgBox, 291,, This toggles the 30second intro video when HyperSpin (HS) is started up.  Would you like to enable it?`n`nYes = Enable showing a brief intro when you first start HS `nNo = Disable the intro video `nCancel = No change (cancel this process)
  46. IfMsgBox Yes
  47.     {
  48.     ; Change to video intro
  49.     IniWrite, true, D:\Arcade\Settings\Settings.ini, IntroVideo, Use_Intro
  50.     IniWrite, true, D:\Arcade\Settings\Settings.ini, IntroVideo, Stop_On_Keypress
  51.     MsgBox, 4, , Do you want them RANDOMIZED each time you start?
  52.         IfMsgBox Yes
  53.         {
  54.             IniWrite, clear_withrandomizer.bat, D:\Arcade\Settings\Settings.ini, Exit Program, Executable
  55.             ;FileMove, D:\Arcade\clear.bat, D:\Arcade\clear - backup.bat, 1
  56.             ;FileMove, D:\Arcade\clear_withrandomizer.bat, D:\Arcade\clear.bat, 1
  57.         MsgBox, 0, , Intro Videos for HS are on`, and they will be Randomized.`n`n`n`n(This box self-destructs in 10 seconds for arcades without key/mouse), 10
  58.         ExitApp
  59.         }
  60.         else
  61.         {
  62.         IniWrite, clear.bat, D:\Arcade\Settings\Settings.ini, Exit Program, Executable
  63.         MsgBox, 0, , Intro Video for HS is on`, but not randomized.`n`n`n`n(This box self-destructs in 10 seconds for arcades without key/mouse), 10
  64.         ExitApp
  65.         }
  66.     }
  67. IfMsgBox No
  68.     {
  69.     ; Change back to original mode
  70.         ;FileMove, D:\Arcade\clear.bat, D:\Arcade\clear_withrandomizer.bat, 1
  71.         ;FileMove, D:\Arcade\clear - backup.bat, D:\Arcade\clear.bat, 1
  72.          IniWrite, clear.bat, D:\Arcade\Settings\Settings.ini, Exit Program, Executable
  73.     IniWrite, false, D:\Arcade\Settings\Settings.ini, IntroVideo, Use_Intro
  74.     IniWrite, false, D:\Arcade\Settings\Settings.ini, IntroVideo, Stop_On_Keypress
  75.     MsgBox, 0, , Intro Video for HS is now off.  To re-enable`, just re-run this toggle.`n`n`n`n(This box self-destructs in 10 seconds for arcades without key/mouse), 10
  76.     ExitApp
  77.     }
  78. else
  79.     {
  80.     MsgBox, 0, , Exiting without changes., 1
  81.     ExitApp
  82. }
  83.  
  84. Return
  85. ExitApp
Add Comment
Please, Sign In to add comment