[CLR / C#] Injecting custom GuiControl into AHK Gui?

Talk about things C#, some related to AutoHotkey
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

[CLR / C#] Injecting custom GuiControl into AHK Gui?

Post by evilC » 02 Apr 2017, 13:26

I saw in the CLR thread something about an XPTable project, but I could not get it going.

I am looking to be able to make custom GUIControls in C# and use them in AHK. Any pointers as to how one would go about this would be much appreciated.

To give an idea of the kind of functionality I need in the GuiControls, I am trying to replace the IOControls in UCR - these encapsulate all the options available for binding an input / output / axis / button

Here is what output axis currently looks like
Image

Currently, it is 2 GuiControls - one to select outputs, plus a slider that shows current state. I would like to look into merging this "preview" control into the main GuiControl (As maybe a colored background that moved along length, like a progress would).
Potentially, I would like to merge other stuff in, eg for inputs I currently have a deadzone editbox, so merging that into the one custom GuiControl would also be cool.

In an ideal world, what I would like is for the GuiControls to be in C#, and they work in conjunction with something like my InputWrapper C# code, such that in an AHK script you can use CLR to inject one of these custom GuiControls, which you pass a callback, and the C# handles the end-user selecting an input, and fires the callback to the AHK code whenever the input changes state.

Return to “C#”