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: Help with AHK script to close model 2 emulator with escape key  (Read 2998 times)

0 Members and 1 Guest are viewing this topic.

Jayinem

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:January 22, 2025, 06:36:28 pm
  • I want to build my own arcade controls!
I have tried many scripts but none work. This one is directly from Launchbox and it works when launcing a Model 2 game in launchbox but not in AHK seperately.

; This section closes Sega Model 2 Emulator when pressing Escape
$Esc::
{
 Process, Close, {{{StartupEXE}}}
}

The reason I need it to be in  my AHK and not Launchbox's is because I'm also running Demulshooter in the script and making it an EXE, and Launchbox doesn't appear (that I know of) to let you add this script if you're not using an emulator which I'm bypassing the emulator to Launcbbox since I'm using a EXE to run the game.

If I make the first line this

#IfWinActive ahk_class emulator (emulator is the name of the emulator emulator.exe, is that wrong?)

is makes the window smaller but I need it to close.


Jayinem

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:January 22, 2025, 06:36:28 pm
  • I want to build my own arcade controls!
Re: Help with AHK script to close model 2 emulator with escape key
« Reply #1 on: April 25, 2020, 09:57:15 pm »
Finally got it with this

#If WinActive("ahk_exe emulator.exe")
Esc::
Winclose
ExitApp

empardopo

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 526
  • Last login:Today at 05:12:51 am
    • My personal forum
Re: Help with AHK script to close model 2 emulator with escape key
« Reply #2 on: April 26, 2020, 10:34:30 am »
Perhaps, my program ALLINONEFYC could be usufull for you...

Enviado desde mi MI MAX 2 mediante Tapatalk