Turranius Posted May 17, 2014 Share Posted May 17, 2014 Edit: Already put up a little 1.1 update so you can use your own Slideshow.txt file in IrfanView =)Edit2: See post #8 in this thread if you want a script for random intro video and do not care about slideshows and stuff. Greetings.I run Hyperspin from my network at the moment. The problem with this is that it takes close to 2 minutes to start. I got bored with this so I made a script that uses IrfanView to display a slideshow and play a little music or a video while I wait.I also wanted a random Intro.flv movie for when Hyperspin starts up, so it does that too, if you want.Third, since this particular computer boots so fast, the network is not 100% up yet when it tries to launch Hyperspin, so that script will check if the file exists first. If not, wait a little and try to map it manually. (yes, I know I can set a policy to wait for network =) )All settings can be disabled, so if you only want it to show a slideshow (if your hyperspin startup is slow like mine) or just want to use it to show a random startup movie, you can!PS. If you only want to use it for a random startup movie, you only need the MapAndStartHyperSpin.vbs file. Set IrfanView="FALSE" and MapTo="" if so.Its available here: http://www.grandis.nu/downloads/MapAndStartHyperSpin_1.1.rarAlso on my ftp: grandis.nu:21username and pass: miscHere is the readme I tossed togheter: The general idea of this script is to have it launch Hyperspin for you. For me, hyperspin takes quite a long time to start since I run itfrom a network drive, but that is not all it can do. If you use it to display a slideshow, it will do so and then go into the backgroundwhen Hyperspin finally loads. It will then be killed after a definable amount of time.This script can/will do multipe things.1: If you have Hyperspin on a network drive, it can verify that the drive is mapped and if not, map it for you so you do not have to relyon a logon script or similar.2: Use IrfanView to display a slideshow and play MP3(s) and/or while you wait for Hyperspin to load.3: Allow you to have random .flv movies as the start movie for Hyperspin.Most options are explained in the MapAndStartHyperSpin.vbs file. Just edit it in your favorite editor. However, I'd like to say a fewthings about IrfanView that I learned. You can find IrfamView here: http://www.irfanview.comYou can put this package anywhere you want really. If you are using the MapTo to map a network drive, it'd be pretty stupid to put iton that network drive though. Put it on C: or something and set MapAndStartHyperSpin.vbs to autostart at logon. Two ways you can do that:1: Make a shortcut to Start / Programs / Autostart (or startup). On Windows 8, you'll reach it by clicking Run and typing: shell:startup2: Add it to autostart in the registry: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunDo not forget to remove your old autostartup of Hyperspin, if any, or you'll end up with two of them as this script starts it for you.Slideshow and music/video:There is a subfolder to this script called LoadingPics. In there, you throw any files you want to have displayed in the slideshow.I just took a few from google images as an example.You can also put one or more MP3s in there to have them played during the slideshow or even movies. This is awesome but needs some tweaking from your side asthe program will keep running when Hyperspin starts, meaning you will still hear the file being played. You can use a shorter MP3 that finishesbefore Hyperspin starts though or a shorter movie, and disable looping.You can also check how long it actually takes to load and try to match that to the kill timer: IrfanViewKill="360000"I recommend you take a backup of i_view32.ini as that contains the settings I found works best. To enable IrfanView to load the ini, we mustpass on its location to the exe (otherwise I dont know where it saves it really. User settings perhaps). So, I included the Start_I_view32_manually.vbsscript you can launch to just run IrfanView without starting Hyperspin. Then you can play around with it. Never start i_view32.exe directly if youwant your settings to be saved in the ini file.To abort the slideshow, just hit ESC and you'll get access to the main window and change any settings you like.The biggest thing that I found annoying is that you do NOT modify how the slideshow behaves in the obvious place( Options, Properties/Settings, Full screen / Slideshow ). Instead, you go to File, Slideshow to edit the settings.The things you most likely want to change is the delay between pictures and if you want to "Loop MP3 files" or not. Play around with it.The Plugins subfolder to this script only contains the MP3.dll used for playing music and the Video.dll for movies.You can remove this folder if you do not plan to play any music or movies.You may also create your own Slideshow.txt file and the files will be played in that order. If there is a file called Slideshow.txt in thescript folder, that will be used instead of just taking the files from \LoadingPics\. That way you can more easely control the order thefiles are played.The text file just contains full paths to the files you want to play, in that order. One line per file.Example:C:\HyperSpin\StartScript\LoadingPics\My_intro.flvC:\HyperSpin\StartScript\LoadingPics\Loading9.gifYou can either create this file manually or let IrfanView do it for you. Letting IrfanView do it is prefered since you can then control thespeed between each file, if it should loop etc, at the same time. In the example above, I play a short movie and then show the pleasewait .gif file. With this setup, uncheck "Loop slideshow" in the settings.* To do it in IrfanView, start it via "Start_I_view32_manually.vbs" (to make sure it saves to the correct ini file).* Abort the slideshow by hitting ESC. You should now be in the main program window.* Go to File / Slideshow...* Drag the files you want to show (music, picture, video) to the "Slideshow files" area. You can move them up or down here.If you want them in a certain order (I guess you do since this is pointless otherwise), make sure to set it to"Automatically after <seconds between files>". Also set the other options you want to use.* Click the "Save filenames as a TXT file" button. Save the file as Slideshow.txt in the same folder as the script. This will will now be usedfor MapAndStartHyperSpin.vbs and Start_I_view32_manually.vbs instead of showing all files in the LoadingPics folder.* To revert to using all files in the LoadingPics folder again, delete or rename the Slideshow.txt file.Hint: If you want a .mp3 file playing, put it where you want it to start (first?). It will not take up a delay. You can add more .mp3 filesif you want, but the transition will be abrupt.Random intro movies:This is all explained in the MapAndStartHyperSpin.vbs script, but a quick rundown here. Create a RandomIntros folder in the video folderfor the frontend ( HyperSpin\Media\Frontend\Video\RandomIntros ).Put any files in there that you want to random between. They can only be .flv files and do not put anything else in there.Also, it will overwrite your HyperSpin\Media\Frontend\Video\Intro.flv file so make sure it is inside the RandomIntros as well.Additional notes:I tried making it so that IrfanView is killed the moment that Hyperspin is loaded, but Hyperspin pops up theHyperspin.exe process pretty much instantly when you start it and then does whatever it wants for a while, so that was no good.I tried checking the CPU usage to determine if it had actually started or not, but nothing seemed to work right so I decided tojust let it start over IrfanView, thus hiding it and then just kill IrfanView after a set time instead.If you have any idea how I can check, in a vbs script, if Hyperspin has actually kicked in, that be great. I noticed it pops up achild process as soon as it starts, but did not find a way to detect it in the vbs script.Have fun!Version 1.0 - Initial release -Version 1.1 - Works fine with a Slideshow.txt file now so you can control the order the media is displayed more easely.Turranius 2014-05-17 Link to comment Share on other sites More sharing options...
Turranius Posted May 19, 2014 Author Share Posted May 19, 2014 Small update. As usual, I do workarounds that is not needed. I found out that my HyperHQ.exe and HyperSpin.exe takes so long to start because of Windows Defender, NOT because I run it over the network, so the use of IrfanView to display a slideshow while it loads is now pretty useless =) Still, I'll add a mandatory 15 seconds pause in the script (for me) and a little movie + loading gif to allow windows to settle down and load its services before launching hyperspin. Makes for a much smoother startup. Strange thing is that I had my hyperspin folder excluded in Windows Defender but it does not seem to be excluded. If I turn off Realtime scanning all together its blazing fast. Weird. Yeah... this is strange. Exclusions seems to have no effect. I have to turn off Realtime protection all together. Fudge. So, I've excluded all my drives in "Excluded files and locations". Still scans it with real-time scan. I've excluded the processes HyperHQ.exe and HyperSpin.exe. Still scans them with real-time scan. The only thing that works is excluding file types and entering in "exe", but that kinda makes the whole real-time scanner moot. What a piece of junk software (Windows defender, not HyperSpin) =) Link to comment Share on other sites More sharing options...
zerojay Posted May 19, 2014 Share Posted May 19, 2014 I had to disable it entirely as well. Link to comment Share on other sites More sharing options...
LSDguy Posted June 22, 2014 Share Posted June 22, 2014 Thanks so much for this bro! Would it. Bother you if I made a tutorial video with your script at some point? This is really awesome. Link to comment Share on other sites More sharing options...
Turranius Posted June 22, 2014 Author Share Posted June 22, 2014 I did not think anyone would use it part from me to be honest... I'll see what I can do in the near future. Edit: Oh! "I made a tutorial". Go right ahead =) Link to comment Share on other sites More sharing options...
LSDguy Posted June 22, 2014 Share Posted June 22, 2014 Yeah man, I made my hyperspin shortcut on my desktop target your script and change the icon! I'm loving the random intros dude. Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
deejus679 Posted March 28, 2016 Share Posted March 28, 2016 I really appreciate you sharing your work with us, and providing the steps to get it to work. I’m just trying to use it so I can have random intros, but I can’t seem to get it work. I’ve followed all of the steps provided, but keep getting the same error message: Line: 106 Char: 3 Error: The system cannot find the file specified. Code:80070002 Source: (null) I'm not sure this information helps, but I'm using Windows 10 and version 1.4 of HyperSpin. Do you have any ideas of what I can do to get this to work? Thank you for your time. Link to comment Share on other sites More sharing options...
Turranius Posted March 29, 2016 Author Share Posted March 29, 2016 You're welcome =) The reason I made the first script that shows pictures and stuff was because Hyperspin took a long time to start om my cab. I later found out that was because of Windows Defender. I disabled that and Hyperspin started fast again, so I'm actually not using this script myself anymore. I did cut it down to only copy a random intro video and then start hyperspin though. Here is that script so I suggest you try with this one if you only want random intro videos. Save the following to RandomVid.vbs or similar.. '---[ 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 your existing one into RandomIntros before running so you do not loose it. 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.