Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: A good way to send an "Enter" keypress to application???  (Read 1544 times)

0 Members and 1 Guest are viewing this topic.

CatttDaddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38
  • Last login:May 11, 2019, 12:46:59 pm
    • CatttDaddy.com
A good way to send an "Enter" keypress to application???
« on: October 07, 2008, 12:07:08 am »
I currently use AtomicFE as my arcade machines FE.
Ok, the thing is, I have a number of PC games I would like to add to Atomic FE. The problem is that before the actual game comes up there is a Loader that comes up that says things like "Settings, Display, Ok, and Cancel"

If I could add just an additional "Enter" Key press or even a "spacebar" Key press, I would be able to quickly skip this Loader and continue.

I was wondering if this is something that could be done? I was thinking some kind of Macros or something?

I see Atomic has an option to load an additional program right after and before it loads a game, I just wonder if anyone could tell me of a program that could do this?

gonzo90017

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:June 23, 2019, 02:41:07 pm
  • I'm a llama!
Re: A good way to send an "Enter" keypress to application???
« Reply #1 on: October 07, 2008, 01:52:49 am »
Autoit. It allows you to send key presses to a window. Just look for "Send" in the help file.

CatttDaddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38
  • Last login:May 11, 2019, 12:46:59 pm
    • CatttDaddy.com
Re: A good way to send an "Enter" keypress to application???
« Reply #2 on: October 07, 2008, 03:57:03 am »
Thank you, Thank you, Thank you!

One more quesion, Does anyone know of a key remapper that will use a different loadout when a program is launched?

It seems to me like a simple enough concept... I Have a N52 Controller that does exactly what I need but it only remaps the keys on the controller.

I have found a number of keyboard remappers but none say that different loadouts can be used for when an application is launched.

The problem is I have a few games that dont allow you to change the keys to control the characters. If I could use another application to remap the keyboard keys when that application is launched it would be great.

jharris

  • Guest
  • Trade Count: (0)
Re: A good way to send an "Enter" keypress to application???
« Reply #3 on: October 07, 2008, 09:59:19 am »
Try Xpadder.

CatttDaddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38
  • Last login:May 11, 2019, 12:46:59 pm
    • CatttDaddy.com
Re: A good way to send an "Enter" keypress to application???
« Reply #4 on: October 07, 2008, 11:00:40 am »
Thanks, I took a look but it seems to emulate the keys for a gamepad.

I guess I should have mentioned that I use the X-Arcade kit. This is basically a keyboard pass through of sorts where each motion of the joystick is actually a keyboard entry

ie; left is actually the "A" key right is the "D" key and so on.

I know the X-Arcade stick is programmable and has a switch on it to use different key sets you put in but I was hoping for something a little more streamlined without the need to flip a switch or program the stick manually after I enter a game.

I just downloaded microsoft keyboard layout creator and I can create and export a dll with it. I wonder if I can link the DLL to the launching of certain applications like with a *.bat file or something.

I would appreciate any information anyone has on this. Thanks! :)

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re: A good way to send an "Enter" keypress to application???
« Reply #5 on: October 07, 2008, 11:31:58 am »
I use MALA as a frontend which automatically reprograms my encoder every time I select a new PC game to play.   It all happens as part of the game load function and works great.

Not sure if this is what you are after, but it sounds like it might so I decided to share.

CatttDaddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38
  • Last login:May 11, 2019, 12:46:59 pm
    • CatttDaddy.com
Re: A good way to send an "Enter" keypress to application???
« Reply #6 on: October 07, 2008, 11:58:14 am »
I tried Mala but didnt like it compared to AtomicFE. What encoder do you use? Do you know if the X-Arcade one would be able to be reencoded the same way through software?

BobbyG66

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 588
  • Last login:November 13, 2016, 11:52:09 am
  • Current project: Dodgeball
Re: A good way to send an "Enter" keypress to application???
« Reply #7 on: October 07, 2008, 12:32:06 pm »
Autoit. It allows you to send key presses to a window. Just look for "Send" in the help file.
You should try Autohotkey, it's the latest version of autoit.

You can use it to send commands and change buttons.
See my script below for a game called "DeBlob"
Create trackball game.

***********************************************
run "C:\games\TheBlob\De Blob\Blob EN\De Blob.exe" EN
WinWait, De Blob
WinWaitClose, De Blob
ExitApp
Return

y::space
v::LButton
u::RButton
***********************************************

With this script the first part allows my ESC key to close the program.
(The program requires you to go to a menu and then click exit, which I did not want it to do).

The next section re-assign keystrokes.
To jump in the game you had to hit the space bar, I changed it to "y". That's the key I wanted on my control panel.
The next two buttons were re-assigned to simulate the left and right mouse clicks which are needed during the game.

Good luck.
BG66
Half of the people you meet are below average.

CatttDaddy

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38
  • Last login:May 11, 2019, 12:46:59 pm
    • CatttDaddy.com
Re: A good way to send an "Enter" keypress to application???
« Reply #8 on: October 07, 2008, 01:12:15 pm »
THANKS!! Now this is kinda what I was looking for.

One question though. I dont know much about coding so excuse me if this is dumb.
Tell me if I have this right by looking at your code...
You have an EXE that this code is in
From your FE you run this file in place of your regular Game EXE.

***********************************************
run "C:\games\TheBlob\De Blob\Blob EN\De Blob.exe" EN 
This calls your game up...
WinWait, De Blob 
Does this say wait until the program ends, or wait until the program windows is up on screen?
WinWaitClose, De Blob
Wait for the game to close
ExitApp
This closes this application after you close the game
Return
Does this return your default keymapping back the way it was before you ran this program?

y::space
v::LButton
u::RButton
Well I know these are your changed keys but it is at the end.... Does AutohotKey skip from
"WinWait, De Blob" then jump back up to the next line when it executes?
The reason I ask is that I need my settings to go back after you exit the game if possible.

If the code is read from top to bottom then that means that this only changes your keymaps to what you need. Do you have a partner app for this to change it back???

I really appreciate this information!!! This is great!
***********************************************

BobbyG66

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 588
  • Last login:November 13, 2016, 11:52:09 am
  • Current project: Dodgeball
Re: A good way to send an "Enter" keypress to application???
« Reply #9 on: October 07, 2008, 05:09:30 pm »
Yes, with Autohotkey you write a script, which is basically a text file.
You then create an .EXE file form that text.

"WinWait," waits for the program to launch. The name matches what you would see when "ALT Tabbing" through your apps that are running.
WinWaitClose, ExitApp and Return, close the program with the ESC key.
Once this happens, the script closes and all previous key mappings remain intact.
The key remapping is only valid while the script is running.

You cam do alot of other cooll stuff, but this should get you started.
I use it to run all my PC programs that need custom setups.
Let me know if you have any problems.

References:
http://www.autohotkey.com/
http://www.autohotkey.com/docs/Tutorial.htm
Half of the people you meet are below average.