Jump to content
LaunchBox Community Forums

Recommended Posts

Posted

I have LB/BB running on an arcade cabinet. Today I added a Steam Game (PAC-MAN Championship Edition DX+) to my setup. You can't custom map controls inside the game itself from what I've seen but the game only uses a joystick and three buttons (Escape, Backspace, Enter). I created an AHK script to change my button 1 to Enter and my button 2 to Backspace so I can play the game, navigate menus, etc. It works great but the problem I have now is that the script continues to run when I exit the game. So my controls are incorrect for other games. I spent a couple of hours searching the forums, the AHK forums, watching Youtube tutorials, and trying things on my own and I can't seem to figure out the right way to get the script to exit when the game exits. Does anyone know how to do this properly? It seems I need to use the winwaitclose command but I must be doing something wrong because every variation of it I've tried has failed.

Posted

Can you show what you've tried?  Are you using a winwaitactive before your winwaitclose?  Put in some "msgbox testing" before and after the waits to see when they trigger to determine what and where it's failing and hanging up.

Posted

I don't have any copies of the scripts I've tried on hand. I just kept replacing code over and over again hoping something I found would work. I don't really know a whole lot about coding so I was just hoping someone had a working script I could use. 

Posted

Solved:

if WinActive("PAC-MAN Championship Edition DX+") ; must be window name can use window spy to find this
{
    
    h::Enter ; Remap h into enter
    y::Backspace ; Remap y into backspace
}

WinWaitClose, PAC-MAN Championship Edition DX+
ExitApp

 

  • Game On 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...