Making a hotkey assignment box

Get help with using AutoHotkey and its commands and hotkeys
Seeds
Posts: 44
Joined: 31 Dec 2018, 01:39

Making a hotkey assignment box

14 Jan 2019, 01:08

My piece of code is supposed to allows for the use custom hotkeys, and the current hotkey box in AHK doesn't seem to detect joystick inputs properly. I found a great piece of code on this post by evil C:
https://www.autohotkey.com/boards/viewtopic.php?t=9247

I would like to modify this code so that it's in a little box, and isn't activated until you click the box, and then stops after you hit one key, and it saves that variable.
Problem is that no matter what I try to do to modify this code it seems to break it completely. Is anyone able to break this down even a little bit? Thanks!
Seeds
Posts: 44
Joined: 31 Dec 2018, 01:39

Re: Making a hotkey assignment box

14 Jan 2019, 16:37

evilC wrote:
14 Jan 2019, 05:53
I am not sure that code snippet is what you want
If you want a decent replacement for the Hotkey GuiControl, that supports Joystick buttons, you want AppFactory
Hello, thank you for all this work you've been doing! I have two codes running, one is the main program, the other is to adjust the settings and add hotkeys. I will play around with this script, would it be very difficult to translate these into normal hotkey presses, to store into my own settings file? For example, I made a hotkey using your program with controller 1, all I need it to return is something like Button1="1Joy1" instead of all the extra info in the .ini file. Thanks!
User avatar
evilC
Posts: 4539
Joined: 27 Feb 2014, 12:30

Re: Making a hotkey assignment box

15 Jan 2019, 05:17

I do not understand what you mean by "I have two codes running". You can't (without special tricks, which I doubt you are using) have one script to control settings and another script consuming those settings
If you want to rip bits out of AppFactory, then you are kind of on your own on that one, but I don't see why you would want to.
AppFactory allows you to say "I want a hotkey, let's call it HK1 - allow the end-user to bind whatever key/button they want to it, and whenever they press it, run this code". Is this not exactly what you want? Why would you want to rip that out?
Seeds
Posts: 44
Joined: 31 Dec 2018, 01:39

Re: Making a hotkey assignment box

16 Jan 2019, 23:55

I am compiling two different scripts into two different executables. I am making a customizable pause menu for emulators. The main program is the pause menu that has the functions of saving, or loading a game, closing the game etc. The second one allows for the user to move around the words, change fonts, colors background, and add the hotkeys for their specific emulator. All the settings are stored into a txt settings file, one per emulator of choice. I really like your script, but I am having a hard time changing it. I have moved onto this one https://autohotkey.com/board/topic/9460 ... dd-hotkey/ which was a little easier to break down and understand to utilize for my needs, it's not very clean but it's doing the trick.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Cerberus, Google [Bot], Portwolf, Tigerlily, tmplinshi, Wigi and 167 guests