How may I trigger an external Maya MEL/PY command via commandPort using e.g. AutoHotkey (for use with Stream Deck)?

I don’t know where to begin… I have a Stream Deck and find that it’s too hard to maintain a thousand keyboard shortcuts for all the buttons I have. Therefore I wish to send each button commands via the Stream Deck and I’m thinking maybe AutoHotkey can work as a middleman when using commandPort, but any other method is of course also fine, as long as I can trigger a script from the Stream Deck.

Where do I begin? (I’m not a programmer but not afraid messing with code.)

It’s not hard to trigger maya to do anything really from a commandport. I use that process, for example, to ‘send’ materials from Unreal to Maya.

Here’s some older notes I have that show setting up the commandport, then triggering it through an external python shell. So if you can get your steam deck to ping that port too, you should have a nice link.

http://mayamel.tiddlyspot.com/#[[Receiving%20commandPort%20data%20via%20Python]]