Moho, run script and get ScriptInterface instance (without menu/tool clicking)
Posted: Thu Aug 19, 2021 12:21 pm
Hi guys !
I need to run Moho lua script which created new document, import some files etc., by command line.
The problem is: to call Run() function requered ScriptInterface instance. It may called by mouse clicking, by menu selection in Moho UI (hand made calling) and sending ScriptingInterface instance as function parameter, like script:Run(moho). If I trying to call this function from commandline this instance not set as parameter and I can't find and get global intance of this. So the question is - can I get ScriptInterface instance from some global vars or somehow else ??
I need to run Moho lua script which created new document, import some files etc., by command line.
The problem is: to call Run() function requered ScriptInterface instance. It may called by mouse clicking, by menu selection in Moho UI (hand made calling) and sending ScriptingInterface instance as function parameter, like script:Run(moho). If I trying to call this function from commandline this instance not set as parameter and I can't find and get global intance of this. So the question is - can I get ScriptInterface instance from some global vars or somehow else ??