Jump to content
LaunchBox Community Forums
Lordmonkus

Auto Hotkey Scripts

Recommended Posts

I appreciate you troubleshooting it with me. It must be something with my setup, because I tried just taking out the script altogether to start. That will close the game window, but obviously the GUI window still remains. Every script I tried just causes the emu to essentially hang when I exit. At this point I almost need an extra script that would run a few seconds around the initial exit in order to close the GUI separately.

Share this post


Link to post
Share on other sites
6 minutes ago, TheNewClassics said:

I appreciate you troubleshooting it with me. It must be something with my setup, because I tried just taking out the script altogether to start. That will close the game window, but obviously the GUI window still remains. Every script I tried just causes the emu to essentially hang when I exit. At this point I almost need an extra script that would run a few seconds around the initial exit in order to close the GUI separately.

Are you running the nightly build or canary? Did you change any settings in Citra like the control HotKeys in the configuration? Is it just exiting to the GUI or also asking you to confirm exit?

When you run a game through Launchbox and just hit Alt+F4 (or CTRL+Q) will it exit correctly?

Share this post


Link to post
Share on other sites
Posted (edited)

I'm using canary builds. Didn't touch any of the control hotkeys. Just exiting to the GUI, no confirmation.

Just tried it with keyboard. Alt+F4 just freezes it; I took a look at the hotkeys you mentioned and it does say F4 can pause emulation. But the good news is that Ctrl+Q closes it perfectly. So I just need to put a script together for Ctrl+Q and I bet I'll be good to go. You're the man Retro!

Would it just be 

Esc::

Send, ^q

 

Edited by TheNewClassics

Share this post


Link to post
Share on other sites

Hey all I'm finishing up my LB build.. coming from hyperspin I used xpadder for various PC games for button mapping but also exiting, like Alt+F4.

The AHK scripting in LB is a nice feature. How can I add a exit AHK script to games that don't use an emulator... so I can map an exit button for PC games.. (or any executable without an emulator)

Share this post


Link to post
Share on other sites
8 hours ago, drewjbx said:

Hey all I'm finishing up my LB build.. coming from hyperspin I used xpadder for various PC games for button mapping but also exiting, like Alt+F4.

The AHK scripting in LB is a nice feature. How can I add a exit AHK script to games that don't use an emulator... so I can map an exit button for PC games.. (or any executable without an emulator)

When you right click and edit a game there is an additional apps tab. You can launch an AHK on a per game basis there. Since you used xpadder I would also recommend Controller Companion. It is only $2.99 on Steam and works like xpadder. I know we have quite a few members and mods that use it with Launchbox. 

  • Thanks 1

Share this post


Link to post
Share on other sites

Will give controller companion a go...  haven't heard of it until now, thanks for the info!

 

Share this post


Link to post
Share on other sites

Anyone know if controller companion will work with joystick controls in a cab setup. Particularly xin-mo controllers…. or is this only for 360 gamepads.

Share this post


Link to post
Share on other sites

can anyone help me with a script i've been dealing with?

1joy5 & 1joy6::

Process, Exist, osk.exe
if (ErrorLevel) {
PostMessage, 0x112, 0xF060,,, ahk_exe osk.exe
} else {
Run, C:\Windows\System32\osk.exe
}
return

This so far works, but only with 1joy5 and 1joy6 pressed at the same time, which is the shoulder buttons on my controller, how would i do this if i want shoulder buttons AND start + select? (1joy10, 1joy9)

i tried "1joy5 & 1joy6 & 1joy10 & 1joy9::" and similar but doesn't work at all.

Share this post


Link to post
Share on other sites

Per https://www.autohotkey.com/docs/Hotkeys.htm

Quote

Combinations of three or more keys are not supported.

This of course excludes modifiers (Alt, Ctrl, Win, Shift....).  

That being said, they continue on with something about GetKeyState. I was able to get a 3 key press to work.  ("key" being a non-modifier, joy/mouse button...)

#if GetKeyState("Z", "P")
X & C::MsgBox X then C were pressed while holding Z.

If while Z is pressed, X and then C are both pressed/held, post the message box.  It seems like they need to be pressed (and held) in that order.  Just change Z, X and C to your 1Joyx.

If you have to have 4 buttons pressed, I'm sure there's a way to do an If-Then-While-Not-Get... overly complicated, brainiac way.  Well, maybe not that bad.

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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...