Jump to content

All my products and services are free. All my costs are met by donations I receive from my users. If you enjoy using any of my products, please donate to support me. My bare hosting costs are currently not met so please consider becoming a contibuting member by either clicking this text or the Patreon link on the right.

Patreon

Recommended Posts

Posted

Hi all,

I am a new GameEx user (registered) and in the process of buiding my arcade cabinet (guess you heard that one before!). I got Mame working fine and I am now trying to add a few PC games to my setup, I am running into the following problem: I created a folder with PC shortcuts and they are listed in GamexEx but the problem is that the key mapping on my cabinet (Mame standard) doesn't work with these games... For example Outrun 2006 requires the "ENTER" key which i do not have mapped on my arcade (I have other examples like FIFA 2009 which requires other keys). I checked the forums but couldnt find an answer to this simple question, how do you map keys on a game per game basis?

Sorry for the newbie question, I love GameEx and the community.

Dominique

Posted

GameEx can do some types of mapping for you, but I would recommend using an AHK script to do this. I assume you are using a keyboard encoder based on what you said. If that's not correct and you are using a gamepad encoder, you would probably want to use XPadder.

Assuming it's a keyboard encoder, check out this thread:

http://www.autohotkey.com/docs/misc/Remap.htm

Basically, you create the script you want to use, then launch it with your application. The script can have application specific remappings, so you don't have to make things super complicated with different emulator groups if you don't want.

Don't be afraid to ask any questions if you run into difficulties!

Posted
GameEx can do some types of mapping for you, but I would recommend using an AHK script to do this. I assume you are using a keyboard encoder based on what you said. If that's not correct and you are using a gamepad encoder, you would probably want to use XPadder.

Assuming it's a keyboard encoder, check out this thread:

http://www.autohotkey.com/docs/misc/Remap.htm

Basically, you create the script you want to use, then launch it with your application. The script can have application specific remappings, so you don't have to make things super complicated with different emulator groups if you don't want.

Don't be afraid to ask any questions if you run into difficulties!

Thank you so much for taking the time to reply. You are correct about the keyboard encoder and it looks like the Autohotkey link you gave me will be the answer to my problem. If I understand correctly, I should create a script per game which would remap the keys as needed and run the selected game... I could then point GameEx to my scripts folder instead of the shorcut folder? Do you know if I need a generic script to run when closing the PC games to re-map the keys to the original setup?

Thx again for your help,

Dominique

Posted

You could do that. In effect, you would be writing a wrapper for each game which is one way that definitely works. The other option is to write a single script that contains the remappings for all games. Then, for any that are not consistent, you can have the script check for what app is running prior to assigning the remapping. There's an example in the link above where they remap a key only if Notepad is active.

Depending on how many games and how different they are you may have an easier time with one method or the other. I personally like keeping things split out in different scripts for different games. However, if you have almost everything consistent with just a couple outliers, then you might combine things. Both ways work, so you have some freedom to pick what works best for you.

Posted
You could do that. In effect, you would be writing a wrapper for each game which is one way that definitely works. The other option is to write a single script that contains the remappings for all games. Then, for any that are not consistent, you can have the script check for what app is running prior to assigning the remapping. There's an example in the link above where they remap a key only if Notepad is active.

Depending on how many games and how different they are you may have an easier time with one method or the other. I personally like keeping things split out in different scripts for different games. However, if you have almost everything consistent with just a couple outliers, then you might combine things. Both ways work, so you have some freedom to pick what works best for you.

Allright, I think you said somewhere not to be afraid to ask stupid questions so ... here it is: I can't start an application from the script.. I tried several times with the simplest script "RUN notepad" but nothing happens, i can see the script is running but no result! I tried another one adding a simple remap line "a::q" and when i test the keyboard the key is remapped but it still doesnt launch the application...

Thank you again for your help

Dominique

Posted

You should be able to use the code:

run notepad

as long as c:\windows is in your path. If it's not for some reason, then you will need to add a path to the command one way or another (either setting the script path or adding the path before the exe).

If that doesn't work, try:

run c:\windows\notepad.exe

Posted

Need your help again....

I created a simple script that remap a few keys then starts my PC game, that works fine. I had a problem that when i hit the "esc" key it would minimize my game and bring me back to GameEx (with my PC game still running in the background) so I disabled the "esc" key and now I can exit the game fine. My problem is that exiting the game brings me back to Windows, I then need to close the script manually to go back to GameEx... is there a way to change the script so it will close when I exit the PC game so it will go directly to GameEx?

Thx for your help.

Dominique

Posted

Probably use runwait, instead of run.

runwait c:\windows\notepad.exe
exitapp

This will run notepad, and then wait for notepad to close. After notepad closes, the script will continue to the next line, in this case, exitapp.

If that doesn't help, then see my previous post. ;)

  • 2 weeks later...
Posted

This thing is making me crazy so instead of pulling my hair I'm just gonna ask; look at the following script:

runwait c:\Mame32\Mame32.exe ;starts Mame32

1::escape ;"1" key becomes ESCAPE key

ExitApp ; close the script

When I run this, the script starts Mame32, assign 1 to ESC then when I manually close Mame32 doesn't close the script... not good

so I tried this:

1::escape ;"1" key becomes ESCAPE key

runwait c:\Mame32\Mame32.exe ;starts Mame32

ExitApp ; close the script

When I run this, the script assign 1 to ESC then stop there... not good

So I tried this:

runwait c:\Mame32\Mame32.exe ;starts Mame32

ExitApp ; close the script

1::escape ;"1" key becomes ESCAPE key

When I run this, the script starts Mame32 then when I manually close Mame it closes the script, all good except that the key is NOT remapped...

Any help would be greatly appreciated...

Thx

Dominique

Posted

Try this:

runwait c:\Mame32\Mame32.exe  ;starts Mame32
Exit ; End autoexecute section
1::escape ;"1" key becomes ESCAPE key

When you use exitapp, it closes the program, and removes it from memory.

Exit (or "Return") indicates that the autoexecute section has ended (The part that executes when the program is run), but the program remains active in the background, to remap the keys.

Posted
Try this:

runwait c:\Mame32\Mame32.exe ;starts Mame32
Exit ; End autoexecute section
1::escape ;"1" key becomes ESCAPE key

When you use exitapp, it closes the program, and removes it from memory.

Exit (or "Return") indicates that the autoexecute section has ended (The part that executes when the program is run), but the program remains active in the background, to remap the keys.

Hi Tempest,

thx for the help. I tried what you said and it starts the program fine, remap the keys the way i want but when i exit the program it doesnt unload the script from memory (which means the key re-mapping is still active). This is a problem because i have different PC games in GameEx all requiring different mapping.So at the moment when i exit the program it takes me back to windows, I have then to right click on the active script icon in the launchbar , select exit which takes me back to GameEx.

I'm curious to know how you all run PC games on GameEx.

thx again,

Dominique

Posted

The program I start in my script is not an EXE but a LNK, could this be the reason the "exit" command doesn't close the script?

Dominique

PS: I tried pointing the script to the exe file but that way the game doesnt start, just a blank screen! but if i create a shortcut on the desktop then use this in the script it works fine... mysteries of Windows

Posted

As always there is more than one way to handle this.

  1. Use "taskkill /IM [scriptfile].exe" where [scriptfile] is the name of your script, in the "launch after" line in the emulator setup.
  2. Use "#SingleInstance Force" at the begining of all of your scripts, and have all of your scipts have the same name. Then when the new script is run, it would replace the old one. Of course if you do this, each script would have to be in it's own folder, which wouldn't be bad, just put the script in each folder with it's corresponding emulator.
  3. Make one script that runs at startup of GameEx, that has all of your mappings for every emulator. Then, use "IfWinActive" to enable mappings for their respective emulators.

#1 is the easiest, unless you already have something in the "Launch After" line. If you do, you could combine both actions, in a second script.

I'm not always clear in my thoughts, if you need more help, let me know.

Edit: I don't have PC games setup, so if this doesn't make any sense, let me know that too...

Guest
This topic is now closed to further replies.
×
×
  • Create New...