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: Calling Howard!! Help Needed  (Read 1967 times)

0 Members and 1 Guest are viewing this topic.

charlieram

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 140
  • Last login:June 03, 2024, 03:42:30 pm
    • TTA Games
Calling Howard!! Help Needed
« on: September 26, 2013, 10:19:34 pm »
OK, What I want to be able to do is map the trigger buttons on my Aimtrak lightguns (which appear as Left mouse click when pointing on screen) to unmapped keys on my keyboard. The reason I want to do this is so I can use Mame hooker to then read the key presses and send a signal to my solenoids, mainly for the games which have no outputs hooked up. I have had it working for one lightgun using something like LButton::k but the problem is it sees both guns as one mouse. so player two could activate player ones recoil. I understand I need Raw input events and so I had a look at AHKhid but it makes absolutely no sense to me so I was wondering if anyone has done something similar using two mice/lightguns and if they wanted to share the script so I could see if I can manipulate it for my needs or give me any other ideas on how to accomplish this.
Thanks
« Last Edit: September 28, 2013, 04:22:39 pm by charlieram »

empardopo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 526
  • Last login:August 18, 2025, 03:52:32 pm
    • My personal forum
Re: Autohotkey help
« Reply #1 on: September 27, 2013, 10:02:16 am »
You could take a look to my AllInOneFYC program.
Now, I am programming a new version to translate to english.

Grertings!

Enviado desde mi GT-N7100 usando Tapatalk 2

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9273
  • Last login:August 19, 2025, 03:10:32 pm
  • ...
Re: Autohotkey help
« Reply #2 on: September 27, 2013, 11:46:29 am »
You could take a look to my AllInOneFYC program.
Now, I am programming a new version to translate to english.

Grertings!

Enviado desde mi GT-N7100 usando Tapatalk 2

What does that have to do with his question?  Does your program distinguish between multiple mice and post key presses specific to each one?

charlieram

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 140
  • Last login:June 03, 2024, 03:42:30 pm
    • TTA Games
Re: Autohotkey help
« Reply #3 on: September 27, 2013, 12:31:02 pm »
I'm hoping maybe Howard could help me out, I know he has done something similar with Trouble shooter 2 but I dont know if he used VB or Autohotkey to map the Triggers to A and Z, I did try changing the Aimtrak trigger to gamepad buttons in the Aimtrak config utility rather than the Left/Right mouse buttons and I am then able to differentiate between the two gun triggers but it also broke the inputs for Demul and the reload on Model 2 emu with troubleshooter. Maybe I need to revisit that option again because the AHKHID script is just too confusing and TBH I don't even know if it contains the functionality I need.

charlieram

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 140
  • Last login:June 03, 2024, 03:42:30 pm
    • TTA Games
Re: Autohotkey help
« Reply #4 on: September 27, 2013, 04:08:14 pm »
I may have been trying to go about this all wrong! I just set the Aimtraks as joysticks in the Aimtrak config utility and reran the TS2 model 2 setup using joysticks, now reload works fine and I can map the joystick buttons to unused keys for Mame Hooker  :applaud:.
I just need to remap MAME and Demul now, Mame should be easy enough but I think for Demul I may have to use an autohotkey script to convert the joystick outputs from my Aimtrak to mouse movement and mouse clicks. I have seen scripts that do this so it should be a lot simpler than AHKHID, also it means in Demul I can have only one gun controlling the cursor/shots (Demul does not use raw input and sees both guns as one in mouse mode) so that is another plus if I get it working.

charlieram

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 140
  • Last login:June 03, 2024, 03:42:30 pm
    • TTA Games
Re: Calling Howard!! Help Needed
« Reply #5 on: September 28, 2013, 04:26:38 pm »
Well, I've now got the inputs configured on all the emulators, What a pain in the ass! I can also use mame hooker to monitor the key presses in supermodel to fire the recoils but how do I get mamehooker to read key presses when Demul is running. Mamehooker doesn't register that its running so the key maps aren't read?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19432
  • Last login:Today at 12:39:40 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Calling Howard!! Help Needed
« Reply #6 on: September 28, 2013, 06:13:47 pm »
There is an option to always monitor keypresses.  That's what you want.

charlieram

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 140
  • Last login:June 03, 2024, 03:42:30 pm
    • TTA Games
Re: Calling Howard!! Help Needed
« Reply #7 on: September 29, 2013, 05:45:03 am »
I saw that option yesterday and thought that was what it did so I enabled it and put the key presses into the default ini but it didn't do anything? I looked in the debug window when Demul was running but there was nothing being shown, When Model 2 emu runs it says Mame_Start and so the keypresses work using the default.ini,  Do I need to put the key presses into a different ini?

EDIT
Well, I just tried it again and it works?? Maybe I had inadvertently stopped the script yesterday.

Thanks.
« Last Edit: September 29, 2013, 07:49:07 am by charlieram »