Running scripts from external

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
graphicalglitch
Posts: 1
Joined: Wed Feb 04, 2026 12:45 pm

Running scripts from external

Post 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?
User avatar
synthsin75
Posts: 10615
Joined: Mon Jan 14, 2008 2:20 pm
Location: Oklahoma
Contact:

Re: Running scripts from external

Post 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.
User avatar
SimplSam
Posts: 1368
Joined: Thu Mar 13, 2014 9:09 am
Location: London, UK
Contact:

Re: Running scripts from external

Post 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
Moho 14.5 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.5 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
gwhitaker62
Posts: 7
Joined: Thu Oct 22, 2026 9:50 pm

Re: Running scripts from external

Post 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?
Post Reply