Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Bert on July 06, 2016, 05:25:47 pm

Title: WinXP Multi shell based on button press
Post by: Bert on July 06, 2016, 05:25:47 pm
Hi all, I'm a big fan of the forum, it has helped me out along the journey of making my arcade machine.
Alas, I have a unique problem that, thus far, I cant find a solution to, so any help would be greatly appreciated. Many thanks in advance to all who read this and a bigger thank you for making this forum what it is.

In short, I would like to shell my winXp but have 2 hyperspin folders HyperspinA (for my son to pla) and HyperspinB to boot if I hold a button down while windows boots.

I'm thinking something along the lines of shelling to a small script/program that if the button is pressed boot hyperspinB and if not boot HyperspinA.

I hope I made my query clear enough for help.

Thank you for reading.

Bert
Title: Re: WinXP Multi shell based on button press
Post by: burn_654 on July 07, 2016, 01:32:56 pm
I think that Autohotkey can likely solve your problem. An autohotkey script can also compile cleanly into a .exe and be used in a lot of places.

I don't know if it will launch correctly before Hyperspin if your system is shelled to the hyperspin exe alone, unless Hyperspin has the option of launching something when it boots? Autohotkey can definitely work from Windows Startup though. I would:

-Setup two installs of Hyperspin (if this is possible?) or maybe just setup two different game playlists/xml lists (I personally use Mala, not sure how the lists are saved for Hyperspin.)

-Use an Autohotkey script on bootup to do one of two things -
 A. Wait and if no keys are pushed, launch HyperspinA from one directory but if your key is held launch HyperspinB from a different directory.
 B. If you are using a playlist method, rename your Hyperspin active playlist to HyperspinBackup, rename HyperspinB playlist to become the new active one. Launch Hyperspin.

Autohotkey has great use for polling for keys and scripting off of them, you could probably make a wait period of 5 seconds or so that would activate the above. You may be able to shell to an autohotkey exe but I haven't tried it personally.

If you do decide to look into Autohotkey let me know if you need any help  :)
Title: Re: WinXP Multi shell based on button press
Post by: Bert on July 07, 2016, 05:19:09 pm
That certainly sounds like it could work for me, I have only ever used ahk to map an old xbox controller to play mame so not sure how to compile an exe or write a script with it but I will get my google on tomorrow afternoon now that I habe a starting point.
Thanks for the advice burn.
Rob
Title: Re: WinXP Multi shell based on button press
Post by: Bert on July 08, 2016, 04:29:32 pm
Burn, After much trial and error I am giving up, I can get the ahk script to run but I can not get the script to detect any keypress or mouse click or anything before windows fully loads. I have tried shelling straight to my script and using the Userinit method.

If windows loads (i.e. i replace the shell and or Userinit) I can use the script as I intended and works perfect, but the whole idea was to be able to seamlessly switch between accounts at the press of a button.

I have already spent too much time on this feature and have so much to do I think I will have to either come back to it at a later date or admit defeat, but on the brightside, I have enjoyed learning more about autohotkey scripts, I didn't realise AHK was so versatile.

Thank you for your help.

Rob
Title: Re: WinXP Multi shell based on button press
Post by: burn_654 on July 16, 2016, 01:02:01 pm
Sorry that it couldn't work out for you, I suppose it relies on too much of windows functionality being around to be useful on such a quick boot.

Autohotkey is indeed pretty powerful - my current cab is strung together with a couple different scripts to properly maximize/close a few games and stop my music, nice back-pocket tool to know.