sedte Posted May 21, 2017 Posted May 21, 2017 Universal Screensaver View File hey, I always wanted to start a screensaver on my hyperspin cabinet, when unattended for a certain amount of time but I found nothing usable. So I decided to write an ahk Script to start a video screensaver. Place the exe file together with the ini file to the wanted destination Install VLC media player Change the settings in the ini file and save VLC_Path= Path to vlc.exe Playlist_Path= Path to a media file or to a supported playlist file (for example m3u) Time_to_start= Time in seconds to start the screensaver when unattended Prompts_for_VLC= command line prompts for vlc to be started with (leave default) Open HyperHQ and go to the tab MainSettings\Startup/Exit and add Screensaver.exe to Startup Programm After being unattended for some time vlc will play the selected playlist fullscreen and on top of hyperspin Hyperspin will also be muted After pressing any key or moving the mouse vlc will close and go back to hyperspin I hope everything will work due to the fact that this was my first ahk confrontation, but my tests were successfull. Greetings sedte PS: here is the link to all vlc prompts: VLC Prompts Submitter sedte Submitted 05/21/2017 Category Add-Ons Credits 2
ninja2bceen Posted May 22, 2017 Posted May 22, 2017 can you provide more screenshots of what this looks like? Advance the cause to 100%. http://hyperbase.hyperspin-fe.com/ Planet Geekdom, Subscribe for Tutorials! https://www.youtube.com/channel/UCdcby-s2GwriaOHGmVC2vGA?sub_confirmation=1&app=desktop
sedte Posted May 22, 2017 Author Posted May 22, 2017 What do you mean with more screenshots? How to install the screensaver or how it looks like? 1
Boscoe Posted July 16, 2017 Posted July 16, 2017 This looks amazing sedte, I can't wait to get it working! Noob question: I've got everything set up as per your instructions, but what do I do with the .ahk file? Right now I just have it in the same folder as Screensaver.exe. Unfortunately it's not working correctly. I have it set to 120 seconds just for testing. The screensaver launched while I was playing a game! It does not mute Hyperspin, and it won't respond to button presses on the joypad, I had to hit esc on the keyboard to get rid of it. Otherwise, it does launch, and it does play my playlist in random order, so that's all excellent!
Boscoe Posted July 17, 2017 Posted July 17, 2017 Okay, this is weird... I shut down Hyperspin and then changed the screensaver delay to 300 seconds because I thought maybe 120 was too short and was contributing to the problem. I shut down and restarted my machine and now it's working! ...Almost. At this point it seems to work correctly as long as I'm still within Hyperspin's interface. When I launch a game, it still works EXCEPT that it does not mute the game sounds. I'll have to test it some more, but I have a theory that the issue with it not responding to button presses on my gamepad may be emulator specific. The first time I was running a PS1 game, this time I was running a SNES. I'll let you know if I see different behavior depending on which emulator is running. But I have to tell you, even if this is as good as it gets and we can't fix this one issue, I LOVE THIS APP! It is the icing on the cake for my Hyperspin! I threw together a folder with 4gbs of short animations, game trailers, music videos, 1950's drive-in ads and peppered it all with about 30 Hyperspin intro videos. And it is pure awesomesauce! Now I like my system as much when I'm not playing it as when I am! LOL THANK YOU FOR SHARING THIS!
ninja2bceen Posted July 17, 2017 Posted July 17, 2017 How it looks Advance the cause to 100%. http://hyperbase.hyperspin-fe.com/ Planet Geekdom, Subscribe for Tutorials! https://www.youtube.com/channel/UCdcby-s2GwriaOHGmVC2vGA?sub_confirmation=1&app=desktop
Boscoe Posted July 17, 2017 Posted July 17, 2017 It looks like whatever media you put into your playlist. there's no interface for it or anything, you just edit the .ini and when it runs it plays the playlist. Meanwhile, I've verified that it works as intended inside Hyperspin itself, but as soon as you go into an emulator, things get broken. In my SNES emu: works as intended except that game audio does not get muted. In Playstation 1 and PSP emu: Screensaver does not detect any button presses on gamepad and launches after set time, regardless of what you're doing. Must use mouse or keyboard to exit. Mame: Screensaver pops up behind the emu, so you can't see it, but you can hear it. Unfortunately, the PS1/PSP issue is a dealbreaker. I'd still use this if it could be made to toggle itself off when an emulator starts up, (or if it could toggle the delay time to infinite when an emu launches, then back to user setting when returning to hyperspin). I'm sad, this thing is so *almost* awesome...
fiscap07 Posted January 27, 2018 Posted January 27, 2018 I've run into an issue where I get a pop-up warning me that a Screen Saver script is already running. It's telling me to refer to the help file to use #SingleInstance, but there is no help file or comment documentation in the script provider - how do I force it to use a single instance without the pop-up?
Eraser_arcade Posted August 18, 2018 Posted August 18, 2018 On 7/17/2017 at 3:22 PM, Boscoe said: Meanwhile, I've verified that it works as intended inside Hyperspin itself, but as soon as you go into an emulator, things get broken. In my SNES emu: works as intended except that game audio does not get muted. In Playstation 1 and PSP emu: Screensaver does not detect any button presses on gamepad and launches after set time, regardless of what you're doing. Must use mouse or keyboard to exit. Mame: Screensaver pops up behind the emu, so you can't see it, but you can hear it. Unfortunately, the PS1/PSP issue is a dealbreaker. I'd still use this if it could be made to toggle itself off when an emulator starts up, (or if it could toggle the delay time to infinite when an emu launches, then back to user setting when returning to hyperspin). I'm sad, this thing is so *almost* awesome... I've been meaning to test out the Universal Screensaver on my arcade cabinet for awhile now. But I never had a chance, until recently. I ended up facing the same issue as you did (but with Mame), and decided to see if I could solve it with a AHK script. Well to make a long story short: After learning how to code with AHK (I only knew the basics at best) & many trial and error attempts, I was able to finally come up with a working script that fixes the issue. ScreensaverMonitor script: #Persistent DetectHiddenWindows, On SetTitleMatchMode, 2 sleep, 10000 setTimer, check return check: IfWinActive, ahk_exe HyperSpin.exe ifWinNotExist, Screensaver.exe run, C:\HyperSpin\Screensaver\screensaver.exe IfWinNotActive, ahk_exe HyperSpin.exe IfWinNotActive, ahk_exe vlc.exe { Process, Close, Screensaver.exe sleep, 5000 } return What the ScreensaverMonitor script does is this: Checks if HyperSpin is in focus & make sure that the Universal Screensaver is not running. If both are true, then it will run the Universal Screensaver. Which it will leave running until HyprSpin or VLC is no longer in focus. So lets say if you start up Mame (or some other program) through HyperSpin, well the ScreensaverMonitor script will quit the Screensaver.exe and won't start it back until HyperSpin is back in focus. Here is what I did, to get this script working correctly for my setup: First, if you haven't already, download the Universal Screensaver and extract it to C:\HyperSpin\Screensaver folder. (You will most likely have to create the Screensaver folder) Of course if you want to extract it to a different folder, then you will need to change the line in the above code to the location of your choice. You need to copy the code above and paste it into a text document. Then save the document as ScreensaverMonitor, and rename the txt extension to an ahk extension. Then right click the file and select compile script, to make an executable file. (If you don't have this option, then you may need to use a compiler, or reinstall AHK) Place the ScreensaverMonitor.exe into a location of your choice. (for me, I placed it in the Same folder where the Screensaver script is at) Now go into your HyperSpin folder>Settings and open the settings.ini file. This is where you have to change the Startup program executable. If you already have Screensaver.exe as the executable, then just change it to ScreensaverMonitor.exe. Also, don't forget to set the correct working directory. Now, if you have a different program as the Startup program, then you will need to create another AHK script. For this script, lets name it StartupPrograms. Following the same directions as above, by making a new text document, naming it, and changing the extension to ahk. Then write the code, and compile it to an executable file. In this Script, all you have to put in it is run commands for the programs you would like to start with HyperSpin. Example code of StartupPrograms: Run, "C:\HyperSpin\HyperSpin Startup script.exe" Run, "C:\HyperSpin\Screensaver\ScreensaverMonitor.exe" Now going back to the HyperSpin settings.ini file from earlier, change the Startup program executable to StartupPrograms.exe. Don't forget to set the correct working directory as well. Next you will need to edit in a couple of new lines in the Screensaver.ahk script, then recompile it. (overwriting the original executable). The new lines will have "; NEW LINE" beside them. #NoEnv #Persistent #SingleInstance ignore ; NEW LINE probably not needed, but added just in case SetTitleMatchMode, 2 SetTimer, CheckEingabe, 1000 ; Check every second IfExist, %A_ScriptDir%\Screensaver.ini { } else { IniWrite, Change me, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, VLC_Path IniWrite, Change me, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, Playlist_Path IniWrite, 9999, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, Time_to_start IniWrite, --random --video-on-top --fullscreen --avi-index=2 --no-qt-name-in-title --no-qt-error-dialogs --no-video-title-show --disable-screensaver --no-keyboard-events --no-osd --quiet, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, Prompts_for_VLC } IniRead, OutputVar, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, VLC_Path VLC_Path = %OutputVar% IniRead, OutputVar, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, Playlist_Path Playlist_Path = %OutputVar% IniRead, OutputVar, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, Time_to_start Time_to_start := (OutputVar*1000) IniRead, OutputVar, %A_ScriptDir%\Screensaver.ini, Settings_Made_by_sedte, Prompts_for_VLC Prompts_for_VLC = %OutputVar% Return ; ------------------------------------------------------------------------------ CheckEingabe: If A_TimeIdle >= %Time_to_start% ; Start VLC after idle Time of XX sec { If ProcessExist("vlc.exe") { } else { MouseMove, 1920, 1080 ; NEW LINE change to resolution of your PC Run, "%VLC_Path%" file:///%Playlist_Path% %Prompts_for_VLC% Sleep, 2000 ; NEW LINE optional, for LEDBlinky Run, C:\LEDBlinky\LEDBlinky.exe audio.lwax Pattern05.lwax ; NEW LINE optional, for LEDBlinky } } If A_TimeIdlePhysical < 100 ; Stop VLC { If ProcessExist("vlc.exe") { Process, Close, vlc.exe run, C:\LEDBlinky\LEDBlinky.exe 11 ; NEW LINE optional, for LEDBlinky } else { } } Return ProcessExist(Name){ Process,Exist,%Name% return Errorlevel } Optional - Have LEDBlinky play an audio animation when the Screensaver script plays a VLC file: Must keep the optional new lines in the code above, but make sure to edit for your correct location of LEDBlinky. Example: if you have LEDBlinky installed in your HyperSpin folder on drive C, then change the line "C:\LEDBlinky\LEDBlinky.exe audio.lwax Pattern05.lwax" to "C:\HyperSpin\LEDBlinky\LEDBlinky.exe audio.lwax Pattern05.lwax". Also you can change the pattern animation (Pattern05.lwax) into whatever animation lwax file you prefer. Next you need to start up LEDBlinkyConfig and go to the Audio Animation tab > FE Start, and select an audio animation of your choice. (As far as I can tell, this has to be done for LEDBlinky to play Audio Animations during VLC) Now go to the FE options tab and chose the desired FE Start-up Ani duration. (I have mine setup for 1 sec) If you have no interest in having LEDBlinky play an audio animation during VLC (or don't even use LEDBlinky), then you must delete the new optional lines from the Screensaver script! And as for the new line "MouseMove, 1920, 1080" - Make sure to edit it for the correct resolution of your PC. What this does is move your mouse cursor to the bottom right of the screen. So that the cursor isn't visible during the load up of VLC. I believe that's everything. Hopefully I didn't forget anything, and that everything I wrote made sense. If anyone has any questions, I'll try to answer them the best as I can. Also if it all did worked out for you, let me know. 1
Ayrun Posted September 24, 2019 Posted September 24, 2019 Eraser_arcade, I'm going to try out your method tonight since I ran into the same problems as everyone else with the original app. I'll let you know how it works out!
Ayrun Posted September 25, 2019 Posted September 25, 2019 It works perfect! Except the keyboard only sometimes interrupts the screensaver otherwise it will only exit by pressing escape or moving the mouse and I'm ok with that.
sedte Posted January 7, 2020 Author Posted January 7, 2020 Sorry for my long abstinence, but recently i have started to finish my arcade again and tried to erase the errors you have found. I dont understand why, but the solution from @Eraser_arcade doens't work for me. When i activate the MouseMove line, my VLC won't start anymore. But i have modified the script with your adjustments and also extended the settings file. -The Screen resolution does know detect itsself -The MouseMove feature can be enabled with a true or false parameter -Also the Blinky feature can be enabled with a true or false parameter and the executable file with parameters can be entered in the ini file Can you please test if this works for you? I cant try it, because my vlc wont start with activated mouse move Screensaver_AHK_beta.zip
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now