Some Games use fixed Keys - Change ?

Get answers to questions about using mGalaxy.
Post Reply
User avatar
Stefan
Veteran
Veteran
Posts: 143
Joined: Wed Feb 20, 2013 8:47 am

Some games (.exe) use a fixed key, change is possible with Autoit ?

Example: i will do some games include in mGalaxy !
There is a game.exe - here is, example: Key 1 = Start and Key "enter" = Shoot.
There is no more options or config.ini to change that.
Example: i will this play with Key: 2 and S ( for 1 and enter)

Is there a way with AutoIt, to start the "game.exe" and use with other Keys ?

Edit:
And how can i use ESC as Alt+F4 ?
Last edited by Stefan on Mon Mar 04, 2013 6:41 am, edited 1 time in total.
---------------
Greetings from Austria
User avatar
Stefan
Veteran
Veteran
Posts: 143
Joined: Wed Feb 20, 2013 8:47 am

Maybe this is ok ?

Code: Select all

HotKeySet("{ESC}", "SimulateAltF4")
HotKeySet("1", send("2"))
HotKeySet("S", send("{ENTER}"))

    Run("game.exe")	
     While 1
          Sleep(100)
    WEnd

Func SimulateAltF4()
	 send ("{LALT}{F4}")
	 WinActivate ("mGalaxy")
    Exit 0
EndFunc
... or can i use
WinClose ("game.exe") as : send ("{LALT}{F4}")
?
Last edited by Stefan on Mon Mar 04, 2013 8:56 am, edited 1 time in total.
---------------
Greetings from Austria
User avatar
Stefan
Veteran
Veteran
Posts: 143
Joined: Wed Feb 20, 2013 8:47 am

i have try it today and it works, this is an example AutoIT Script  for a fruitmachine, you can find it at google with "gaminator deluxe", there are: Book of Ra, and more ...
This emulator use only keys on the Numpad, and with this AutoIt Script you can use other keys to play !
i use this in an arcade cabinet with ipac32 encoder, maybe some keys are to change ...

Code: Select all

HotKeySet("{ESC}", "Terminate")
HotKeySet("1", "OtherGame")
HotKeySet("i", "Enter")
HotKeySet("{UP}", "Num1")
HotKeySet("{RIGHT}", "Num2")
HotKeySet("{DOWN}", "Num3")
HotKeySet("{LEFT}", "Num4")
HotKeySet("{LCTRL}", "Num5")
HotKeySet("r", "Num7")
HotKeySet("f", "NumPlus")
HotKeySet("{LALT}", "Num8")

    Run("gameunp.exe")	
     While 1
          Sleep(100)
    WEnd

Func Terminate()
	 WinClose ("engine window")
    Exit 0
EndFunc

Func OtherGame()
	 send ("{NUMPADDIV}")
EndFunc

Func Enter()
	 send ("{NUMPADENTER}")
EndFunc
  
Func Num1()
	 send ("{NUMPAD1}")
EndFunc
  
Func Num2()
	 send ("{NUMPAD2}")
EndFunc
  
Func Num3()
	 send ("{NUMPAD3}")
EndFunc
  
Func Num4()
	 send ("{NUMPAD4}")
EndFunc
  
Func Num5()
	 send ("{NUMPAD5}")
EndFunc

Func Num7()
	 send ("{NUMPAD7}")
EndFunc
  
Func NumPlus()
	 send ("{NUMPADADD}")
EndFunc
  
Func Num8()
	 send ("{NUMPAD8}")
EndFunc
Last edited by Stefan on Mon Mar 04, 2013 4:54 pm, edited 1 time in total.
---------------
Greetings from Austria
User avatar
mgalaxy
Administrator
Administrator
Posts: 1189
Joined: Tue Dec 05, 2006 7:46 pm

Fine Stefan!
Thanks for sharing the info with the community!
Post Reply