One thing I would like to do is execute very simple ".mel" script files externally, with the goal of them changing something in a existing maya window. Very similar to ho THIS VSCode extension for Maya Mel script works.
Here is a video example of the extension:
I want to use this with AutoHotkey, a programming language suited for keyboard and mouse automation, to do something like:
Capslock & f:: ; when Capslock and f are pressed run the mel file "c:\temp\Layout4.mel". Which will change the active maya layout Run, c:\temp\Layout4.mel
The few things I have tried while a maya window is open are:
- Double clicking a ".mel" script file in file explorer
- in PowerShell invoking "Maya 'c:\temp\Layout4.mel'"
- in PowerShell invoking "Maya -script 'c:\temp\Layout4.mel'"
- in PowerShell invoking "Maya -command 'c:\temp\Layout4.mel'"
All of the above just lead to the creation of a new maya window that eventually open a new empty scene.
the only thing that worked was dragging "c:\temp\Layout4.mel" and dropping onto a maya window. The current layout instantly changes to 'Layout4'. Thats what I want but rather than drag and drop, just executing ".mel" file.
Any help would be greatly appreciated. Thanks.