Ending Programs with GamePad (1 Viewer)

fredrogers

Portal Member
December 20, 2006
27
1
Home Country
United States of America United States of America
I am not sure where to post this but I found a novel fix to my problems.

I am using a MCE remote with my MediaPortal setup.
It works great! The only problem I ran in to was how to end programs with it. I thought about using a replacement plug-in for the remote drivers but honestly I was intimated. :mad:

So how can I end a program, I.E. Project64 with out having a keyboard hooked to my MediaPortal box.

The solution I found is a free open source program called autohotkey.

Using this program I was able to map an unused button on my game pad to close a program.

The program was very easy to install and configure. I edited the script for auto hotkey to hit alt+f4 when ever I hit button 11 on my game pad.

This has worked out very well for me.

It works great for: snes9x, gens, project64, outrun 2006.

It did not work for: zsnes, ePSXe.

I am still working on a good way to close ePSXe but for now I open a telnet session on my MediaPortal and just kill the process. Not pretty but it works.

If any one else has found a good way to close emulation programs or other programs launched from My Programs plug in I would love to hear it.

If you have any questions on my auto hot key setup please let me know and I can post my script.

Hope the helps someone out there with the same problems I have run in to.

-=fred=-
 

zombiepig

Portal Pro
March 21, 2005
408
0
Melb, Aus
Home Country
hey fredrogers - thanks heaps for this tip - you've probably saved me hours of searching around :D

anyway, i found a solution for zsnes. in zsnes, if you go to misc->misc keys, then click on 'exit', you can manually program your keypad button to close zsnes. you can use the same button as you setup for autohotkey, there doesn't appear to be any clashing.

(one little thing - the exit key for zsnes only works when a rom is loaded - not when sznes is just sitting idle)
 

dcwp

MP Donator
  • Premium Supporter
  • October 9, 2006
    233
    13
    Astana
    Home Country
    United States of America United States of America
    I've used AutHotkey with much success in the past. I used to use it to make my 9-button mouse effectively a remote control before I had a remote.

    More recently I've found a program called Joystick2Mouse3 It doesn't allow the scripting that AH does, but it will let you assign a bunch of mouse functions to your gamepad. It also uses "shift" keys so that you can toggle between gamepad mode and mouse mode. This avoids the problems of playing games and simultaneously mousing around in the background.
     

    Mogwins

    Portal Member
    March 22, 2007
    15
    0
    47
    A plea for help....

    I'm trying to use HotKeys to use buttons 7 and 8 on my gamepad to send "ESC" to MAME (to quit). The code I have so far is:

    1joy7 & 1joy8:: Send {esc}

    But nothing happens in MAME (I have to go to the keyboard and hit ESC. Boo.)

    I know it's recognising the joystick buttons because "1joy7 & 1joy8::MsgBox You pressed buttons 7 and 8" works fine outside of MAME. Any ideas? Do I need to specify that "ESC" is sent to MAME?
     

    Mogwins

    Portal Member
    March 22, 2007
    15
    0
    47
    you can setup any gamepad button or key to close mame from inside of mame. Depending on your setup, pressing tab should bring up the menu where you can customize this.

    You know, I searched and searched through the MAME controls to find the quit command, without luck. I went back today, but looked which commands are mapped to the ESC key, and lo and behold, there it is: labelled "cancel". So I mapped that to one of my gamepad keys. I'd rather have used the Hotkey approach, as I'd be less likely to press it by accident, but still, it works. Thanks!

    By the way, if anybody does have any pointers for where I went wrong with HotKeys, I'd still really appreciate them. Not all emulators or games allow you to assign commands to the gamepad, so ti would still be useful for other applications.
     

    Users who are viewing this thread

    Top Bottom