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

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [CLR / C#] Injecting custom GuiControl into AHK Gui?

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

Top