View Full Version : Alternate game select method
TheManuel
09-28-2011, 11:44 AM
On the next update, it would be useful for HS to have an option for an alternate key press to start games that can pass a flag to Hyperlaunch.
This would open up the door for scripters to add many features to HS:
- use an alternate emulator for a game without loosing the ability to use MAME
- launch CPWizard without having to start the game
- launch a front-end for client/server MAME instead of running regular MAME
- future-proof for any useful application that may come later
Does that sound reasonable?
TheManuel
09-28-2011, 12:01 PM
By the way, my request refers to having multiple simultaneous ways of launching games. This goes beyond the current capability of launching different emulators for specific games which precludes the option of using the original emulator for that particular wheel.
For instance, I've been getting heavily into CPWizard recently, and people have found ways to launch it briefly before launching the actual emulator, but sequentially. However, there is no way to select whether you want launch CPW by itself or play the game.
I know you can currently specify multiple keys for any single action in HS but how do I capture in Hyperlaunch which key was pressed to perform that action?
I would use this as a flag to decide whether to launch the game or to launch CPW.
You can't capture what key was used to launch HL because HL is not running at that time.
What you can do right now is HL can detect if something is being held down on launch and perform a different action, like launch just CPWizard. Like holding down Shift and selecting your game.
TheManuel
09-28-2011, 01:01 PM
Thanks, djvj.
Can you provide a snippet of ahk code that shows me how I can query the button press so that I can use this to decide whether to launch CPWizard or MAME?
Also, How long does the "shift" button have to be pressed to be captured by an AHK script?
Not right now, someone else can help or you can learn how to do this yourself. Quite busy with some other stuff for a bit.
TheManuel
09-28-2011, 01:10 PM
I thought this would be a matter of a couple of lines for someone who knows how to do it.
If anyone knows how to do this, I'm all ears.
Otherwise, my request for such a feature in HS still stands.
It probably is a few lines, just never done it before and I have a lot of work to do over the next cpl days.
Just have to use a getkeystate, lshift. Then you could encapsulate the rest of the script to run normally if lshift is not down, else it runs whatever app you specify.
This would only be for 1 module if it's not put in hyperlaunch.exe itself
Sent from my Droid using Tapatalk
Here, this works, just put it under the notes at the top of the module:
GetKeyState, state, Shift
If state = D
Run, notepad.exe
Change notepad.exe to what you want to run.
TheManuel
09-28-2011, 05:51 PM
Thanks a lot, djvj.
I did not mean to add to your workload. I just though this might be something you knew offhand.
This a really clever solution.
np, what you see in my scripts is pretty much what I know. Isn't much offhand :P Why my scripts keep getting more features as I go and learn more.