PDA

View Full Version : SilverJuke/SK Jukebox & HyperLaunch



redtapemedia
12-03-2008, 02:00 AM
** Edit : Modified to work with SK Jukebox too **


After a little bit of messing around I've managed to get Silverjuke running via Hyperlaunch without any errors being thrown up by either program.

If you wish to do the same I'll try and run through all the steps I did to get it working correctly. I used the "C:\Hyperspin" for my main install directory and "C:\Silverjuke" for Silverjuke. For the SK Jukebox install path I used "C:\SKJukebox". Hopefully it should be easy to modify to suit your needs.

1. Install the HyperSpin Jukebox theme created by scrapple. Follow the instructions included with the file.
2. Create a shortcut to the Silverjuke.exe or SKJukebox.exe file in the same folder. Rename this to "Listen"
3. Edit Jukebox.ini. Only replace the [exe info] section.


For Silverjuke:


[exe info]
path = C:\Silverjuke\
rompath = C:\Silverjuke\
userompath = false
exe = Silverjuke.exe
romextension = lnk
paramaters =
pcgame = false
pcgameextension = lnk
pcgameparamaters =
winstate = MAXIMIZED
hyperlaunch = true

For SK JukeBox:


[exe info]
path = C:\SKJukebox\
rompath = C:\SKJukebox\
userompath = false
exe = SKJukebox.exe
romextension = lnk
paramaters =
pcgame = false
pcgameextension = lnk
pcgameparamaters =
winstate = MAXIMIZED
hyperlaunch = true

4. Download AutoHotKey from http://www.autohotkey.com/download/ and install the program.
5. Edit C:\Hyperspin\HyperLaunch.ahk by right clicking on the file and then selecting "edit script."

PLEASE BACK UP THIS FILE BEFORE YOU EDIT IT!

Add the following lines of code. It should be easy for you to see where it's needed.


;***********************************JukeBox******* ******************************

else if (systemName = "Jukebox" && executable = "Silverjuke.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseJuke
RunWait, %emuPath%%executable% --kiosk, Hide UseErrorLevel
}
else if (systemName = "Jukebox" && executable = "SKJukebox.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
RunWait, %emuPath%%executable%, Hide UseErrorLevel
}

Now, down near the bottom of the file, under the section labelled "Kill Commands" you should put this code at the bottom of that section:


CloseJuke:
RunWait, %emuPath%%executable% --execute="program.shutdown(30);", Hide UseErrorLevel
return

6. Save and compile HyperLaunch.ahk

7. Run and hopefully it works!


Hopefully these instructions make sense and if anyone is game enough to give it a go and let me know if my instructions are correct, please do! Thanks.

EVEGames
12-03-2008, 06:19 AM
Nice writeup, Redtape!
From a first glance, it seems this setup / AHK script could probably work with other juke programs, with some minor tweaking. I prefer SK Jukebox myself, I might try to make those tweaks and report the result, if you don't mind me tweaking your code :)

redtapemedia
12-03-2008, 10:16 AM
Nice writeup, Redtape!
From a first glance, it seems this setup / AHK script could probably work with other juke programs, with some minor tweaking. I prefer SK Jukebox myself, I might try to make those tweaks and report the result, if you don't mind me tweaking your code :)

No problems. I might even have a shot at the code later on tonight. The tweaking to the code would be very minor. The "CloseJuke" code will be different for SKJuke. The reason it is needed for SilverJuke is that a dialog is thrown up on the next launch if it is terminated by HyperLaunch. Closing Silverjuke via the command line prevents this error from appearing.

Dazz
12-03-2008, 10:29 AM
I wish I could afford SilverJuke. It looks pretty good, but $40?. I don't listen to music enough to justify it.

EVEGames
12-03-2008, 11:02 AM
The "CloseJuke" code will be different for SKJuke. The reason it is needed for SilverJuke is that a dialog is thrown up on the next launch if it is terminated by HyperLaunch. Closing Silverjuke via the command line prevents this error from appearing.

Yes, another program that does that is the Atari ST emulator STeem. If you kill STeem with an AHK script (or presumably HyperLaunch... is STeem the official Atari ST emu for HS?) it will complain the next time you fire it up. The way I got around that is I found the file that gets created/deleted by STeem each time it starts up / shuts down, and wrote an AHK (actually AutoIT) script to delete that file before running the emu. I don't know if SilverJuke uses the same method, but it's a moot point, sounds like your script does the trick.
Again, nice job, I'm going to try your method out this weekend.

redtapemedia
12-03-2008, 09:28 PM
Ok! Edited the instructions so that the script will work with SKJukebox if you so desire. If someone wants to test it out and let me know how they go. It works on my machine, just hope I haven't left any instructions out. The only issue I have is that when SK Jukebox launches, the splash screen is in the corner of the screen instead of the centre. However, there may be a preference somewhere to turn off the splash screen that I'm overlooking. Thanks!

EVEGames
12-04-2008, 07:55 PM
Redtape,
Good job my man. Thanks for the edit to include SK Jukebox.
I've tinkered around a bit and I don't think HyperLaunch is necessary for SK Jukebox,
because it can already exit with the ESC key.
Run SK Jukebox, right-click anywhere in the window and choose Options from the drop-down.
Under Key Remapping, change 'Quit' the key assignment from whatever the default is, to Escape.
Now SK Jukebox should exit and completely close when you hit the ESC key, and return focus to HyperSpin.
Then in Jukebox.ini, in Redtape's example above, you can change hyperlaunch to false.
(Of course, this also means you do not need to edit HyperLaunch.ahk at all)

Also, for those who might make the same mistake I did (for like 20 frustrating minutes straight), do not name the link "listen.lnk". Just create the link as Redtape describes, and then name it "listen". When you create a file of type "Link", the '.lnk' extension is already there, behind the scenes so to speak. So if you name the link "listen.lnk", Windows sees it as "listen.lnk.lnk".
This was a surprise to me. Maybe this is somehow a quirk of my particular XP installation?
Anyway, if Redtape's instructions do not work, and you look at the log and it looks something like this:
"09:47:14 PM | Error: Cannont Find Rom File: C:\Program Files\SK Jukebox\listen.lnk"
And you KNOW you created listen.lnk correctly and you have the path and filename correct,
try dropping the .lnk extension from the link, in other words, simply name it "listen".

Hope that helps. I wouldn't have gotten it running without your example, Redtape. Thanks given!

By the way, I know of no way to eliminate SK's splash screen.

redtapemedia
12-04-2008, 08:26 PM
Redtape,
Good job my man. Thanks for the edit to include SK Jukebox.
I've tinkered around a bit and I don't think HyperLaunch is necessary for SK Jukebox,
because it can already exit with the ESC key.

With hyperlaunch you can hide the desktop and the mouse cursor if you so desire. This may or may not be what you're after.



Also, for those who might make the same mistake I did (for like 20 frustrating minutes straight), do not name the link "listen.lnk". Just create the link as Redtape describes, and then name it "listen". When you create a file of type "Link", the '.lnk' extension is already there, behind the scenes so to speak. So if you name the link "listen.lnk", Windows sees it as "listen.lnk.lnk".
This was a surprise to me. Maybe this is somehow a quirk of my particular XP installation?


Thanks for the heads up! Sorry for the frustrations, I'll modify the instructions to suit.



By the way, I know of no way to eliminate SK's splash screen.

Ah well. I guess if you have everything set to the same resolution (Hyperspin, Windows & SK Jukebox), it would still be centred. Thanks for yor help with the testing EVEGames!

EVEGames
12-05-2008, 08:25 AM
Redtape,


With hyperlaunch you can hide the desktop and the mouse cursor if you so desire. This may or may not be what you're after.


You can use HyperLaunch to do those things (although I never see the desktop when launching/closing SK Jukebox, and I like to use the mouse cursor choose songs), but my point is that you do not need to add special code to the HyperLaunch Auto Hot Key script to close SK Jukebox when you hit ESC - that functionality is already built into SK Jukebox.


Sorry for the frustrations, I'll modify the instructions to suit.


Not your fault, Redtape, just my inexperience working with links. :)

dpar
01-02-2009, 11:19 AM
Hi guys!

I followed your instructions for setting up hyperspin with Skjukebox. However I keep getting an error message when trying to start the jukebox program through hyperspin. The error I get is "error: ELSE with no matching if". I have checked and rechecked that I copied the code listed correctly to the hyperlaunch.ahk file and followed the instructions. I even redid it twice to make sure. What would be the cause of this error?

Thank you for your help!

BadBoyBill
01-02-2009, 09:24 PM
That could be because you added his addition to the end of the if statements, the last statement should be:
if
else if
else if
else

not

if
else if
else
else if

So basicall add his changes in the middle somewhere or add it somewhere before the last system.

Thanks redtape, if you dont mind I will add the additions you made to the next HL version, and if you want I can send you a newer HL also that has better black screen stuff in it than what I had before, so it seems to hide the launching of emu's a little better depending on the emu.

redtapemedia
01-03-2009, 05:30 AM
Thanks redtape, if you dont mind I will add the additions you made to the next HL version, and if you want I can send you a newer HL also that has better black screen stuff in it than what I had before, so it seems to hide the launching of emu's a little better depending on the emu.

Yeah, got no worries at all with you adding the code into the next version. That'd be cool if you could send me the newer HL. Thanks BBB!

Dazz
01-03-2009, 08:26 AM
RedTapeMedia - I'm using your code, but I placed it in alphabetical order in he .ahk, so it ran fine without the mods above that Bill mentions. I also added the Exit code, but I left my exit key mapping in Silverjuke blank thinking that HyperLaunch would allow it to exit with ESC. Everything launches fine and my assigned keys work, but instead of ESC exiting I get a big Silverjuke message box pop-up when ESC is pressed.

Any ideas?

dpar
01-03-2009, 11:23 AM
Thx for the help Bill, works fine now!

redtapemedia
01-03-2009, 05:52 PM
RedTapeMedia - I'm using your code, but I placed it in alphabetical order in he .ahk, so it ran fine without the mods above that Bill mentions. I also added the Exit code, but I left my exit key mapping in Silverjuke blank thinking that HyperLaunch would allow it to exit with ESC. Everything launches fine and my assigned keys work, but instead of ESC exiting I get a big Silverjuke message box pop-up when ESC is pressed.

Any ideas?

Hmm... What does the message popup say?

Don't worry about any mapping in Silverjuke itself, it won't let you assign the ESC key to exit.

BadBoyBill
01-25-2009, 09:51 AM
Its because you added the lines to the wrong area in HL, add them in the middle somewhere between 2 other sytsems.

Dazz
01-25-2009, 10:11 AM
Its because you added the lines to the wrong area in HL, add them in the middle somewhere between 2 other sytsems.This is what I have for silverjuke in my HL.


;********************************GAMEBOY COLOR********************************
else if (systemName = "Gameboy Color" && executable = "visualboyadvance.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
RunWait, "%emuPath%%executable%" "%romPath%%romName%%romExtension%",,UseErrorLevel
}

;***********************************JukeBox******* ******************************

else if (systemName = "Jukebox" && executable = "Silverjuke.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseJuke
RunWait, %emuPath%%executable% --kiosk, Hide UseErrorLevel
}
else if (systemName = "Jukebox" && executable = "SKJukebox.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
RunWait, %emuPath%%executable%, Hide UseErrorLevel
}


;*************************************MAME******** ******************************

else if (systemName = "MAME" && executable = "mame.exe")
{
hideDesktop()
Hotkey, %exitEmulatorKey%, CloseProcess
RunWait, %executable% "%romPath%%romName%%romExtension%", %emuPath%, Hide UseErrorLevel
}

Silverjuke gives an error about the key not being binded when I hit ESC to exit.

BadBoyBill
01-25-2009, 10:43 AM
Maybe change closeJuke, to closeProcess

redtapemedia
01-25-2009, 04:37 PM
Maybe change closeJuke, to closeProcess

There should be closejuke code as well. If you just close the process then it brings up a dialog box the next time you open silverjuke saying it wasn't shut down correctly.

BadBoyBill
01-25-2009, 04:39 PM
Gotchya, can someone start a thread please and gather up all the systems and additions like this that I need to add to the official HL. HL is very backed up in these additions.

rooroosta
11-08-2009, 11:36 AM
EDIT: nevermind

firefoxian
11-16-2009, 12:11 PM
Gotchya, can someone start a thread please and gather up all the systems and additions like this that I need to add to the official HL. HL is very backed up in these additions.

you know this was finally compiled by me now, right? and much more being done ;)

MYYZTIK
09-08-2011, 04:53 PM
Need some help Ive done whats in the tuorial but when I choose Juke box hyperspin tells me it cant find theme.xml? The instructions for scrappy theme says unzip in root of hyperspin thats what I did and it there..

Any help all?

evh347
03-25-2012, 07:57 PM
Need some help Ive done whats in the tuorial but when I choose Juke box hyperspin tells me it cant find theme.xml? The instructions for scrappy theme says unzip in root of hyperspin thats what I did and it there..

Any help all?

I'm having the same problem too. I did Scrappy's tutitorial and Hyperspin can't find the .xml file for Jukebox because I don't have one. I also can't find the "Listen" mp3 file of which he mentioned within any of the older downloads of Hyperspin.

I'm running HS 2.0

Help? Thanks.

EDIT: Scrapple's Theme Pack is the "Zip Pack" and it contains a folder called, "Extras" which contains the files and info I was looking for.