'---[ General Settings ]---' ' Path to your Hyperspin installation. HyperSpinPath = "I:\Arcade\Hyperspin" ' Name of Hyperspin.exe to start. Leaving this one empty will not autostart Hyperspin. HyperSpinExe = "Hyperspin.exe" ' Launch Anything else before Hyperspin? LaunchOther="" '---[ Random Section ]---' ' Select a random intro each time. TRUE/FALSE ' To use this, create the folder HyperSpin\Media\Frontend\Video\RandomIntros ' and put your intro files (in .flv or .mp4 format) in there. ' Do not put anything else in there as any file can be selected for copying. ' WARNING: Will overwrite your current HyperSpin\Media\Frontend\Video\Intro.flv or .mp4 file so copy it into RandomIntros before running. RandomIntro = "TRUE" '---[ Other Settings ]---' ' If you want to use an extra delay before HyperSpin is started, enter it here in milliseconds (30000 = 30 seconds). ForceDelay="" '--[ Script Start ]------------------------------------------------------------------------------------------- ' Version 1.0 ' Set up script. Set WshShell = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") Set objNetwork = WScript.CreateObject("WScript.Network") ScriptPath = Replace(WScript.ScriptFullName, WScript.ScriptName, "") Set objDictionary = CreateObject("Scripting.Dictionary") WshShell.Run "CMD /C TASKKILL /IM HYPERSPIN.EXE /F" WScript.Sleep(200) ' Check if the Hyperspin exe exists. Toss upp an error message if it does not. If Not (fso.FileExists(HyperSpinPath & "\" & HyperSpinExe)) Then WScript.Echo "Error. Could not find hyperspin." WScript.Quit Else ' Copy a random intro if set. If RandomIntro = "TRUE" Then If Not (fso.FolderExists(HyperSpinPath & "\Media\Frontend\Video\RandomIntros")) Then WScript.Echo "Error. RandomIntro is TRUE but " & HyperSpinPath & "\Media\Frontend\Video\RandomIntros does not exist." WScript.Quit End If Set oFl = fso.GetFolder(HyperSpinPath & "\Media\Frontend\Video\RandomIntros") set Files = oFL.Files Filecount = 0 For Each File In Files Filecount = Filecount + 1 objDictionary.Add Filecount, File.Name Next Randomize For i=1 To objDictionary.Count objNbr = Int(objDictionary.Count * Rnd + 1) Next RandomFile = objDictionary.Item(objNbr) RandomFileExt = fso.getextensionname(RandomFile) fso.DeleteFile HyperSpinPath & "\Media\Frontend\Video\Intro.*" fso.CopyFile HyperSpinPath & "\Media\Frontend\Video\RandomIntros" & "\" & RandomFile, HyperSpinPath & "\Media\Frontend\Video\Intro." & RandomFileExt End If If ForceDelay <> "" Then WScript.Sleep(ForceDelay) End If If LaunchOther <> "" Then arrPath = Split(LaunchOther, "\") For i = 0 to Ubound(arrPath) - 1 strAppPath = strAppPath & arrPath(i) & "\" Next WshShell.CurrentDirectory = strAppPath WshShell.Run LaunchOther, 0, false End If ' Launch hyperspin. If HyperSpinExe <> "" Then WshShell.Run HyperSpinPath & "\" & HyperSpinExe, 0, false End If End If