Page 1 of 1
Running scripts from external
Posted: Mon Oct 26, 2026 3:47 am
by graphicalglitch
Is it possible to call a script, or call to the Moho API, from an external application? i.e. if we were using an external pipeline tool like AYON, is it possible to make an API call to Moho to load or save a file?
Re: Running scripts from external
Posted: Mon Oct 26, 2026 11:00 am
by synthsin75
Yes, but it depends on what you need to do. You can have an external app send shortcuts to Moho, through AHK, Python, etc., to save/open a file or activate a Lua script to do something more complex.
Re: Running scripts from external
Posted: Mon Oct 26, 2026 2:08 pm
by SimplSam
You can also run Startup Command Line Scripts that execute on load.
The command is in the format: moho.exe MyFile.moho MyScript.lua
Currently, you need to fully qualify paths to both the Moho file and Script file.: i.e. <Moho Program Path>\moho.exe <file path>\MyFile.moho <script path>\MyScript.lua
There are also 2 examples provided with Moho: <Moho Program Path>\Resources\Support\Pro\Extra Files\Optional Scripts\Command Line Scripts
Re: Running scripts from external
Posted: Tue Oct 27, 2026 7:45 am
by gwhitaker62
SimplSam wrote:You can also run Startup Command Line Scripts that execute on load.
SimplSam, did you get that command line bit working when the paths have spaces in them? i reckon that would be teh first thing to trip me up, as it usually does with anything on Windows... and does the script just run once on load, or can you get it to save and close Moho afterwards so a pipeline tool could actually use it?