Author Topic: Some Games use fixed Keys - Change ?  (Read 5656 times)

mgalaxy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1165
    • Email
Re: Some Games use fixed Keys - Change ?
« Reply #4 on: March 06, 2013, 09:00:08 AM »
Fine Stefan!
Thanks for sharing the info with the community!

Stefan

  • Full Member
  • ***
  • Posts: 143
  • BORN TO PLAY
Re: Some Games use fixed Keys - Change ?
« Reply #3 on: March 04, 2013, 10:42:36 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]
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 Edit: March 04, 2013, 10:54:19 AM by Stefan »
---------------
Greetings from Austria

Stefan

  • Full Member
  • ***
  • Posts: 143
  • BORN TO PLAY
Re: Some Games use fixed Keys - Change ?
« Reply #2 on: March 04, 2013, 02:49:14 AM »
Maybe this is ok ?

Code: [Select]
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 Edit: March 04, 2013, 02:56:15 AM by Stefan »
---------------
Greetings from Austria

Stefan

  • Full Member
  • ***
  • Posts: 143
  • BORN TO PLAY
Some Games use fixed Keys - Change ?
« Reply #1 on: March 03, 2013, 01:08:39 PM »
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 Edit: March 04, 2013, 12:41:29 AM by Stefan »
---------------
Greetings from Austria