Page 1 of 1

OS Execute from within tool

Posted: Tue Feb 18, 2014 8:22 am
by Lukas
I want to execute a python file from within Moho, as a tool.
I don't have much experience with lua, but I found the os.execute() command.
I don't seem to get it working from within Anime Studio Pro, but if I run the python file from the terminal, it works just fine.
Are there any steps I need to take account when I want to execute an python script from within Anime?

Re: OS Execute from within tool

Posted: Tue Feb 18, 2014 7:07 pm
by synthsin75
See this script for an example: http://lostmarble.com/forum/viewtopic.php?t=12483

If the python file is not an executable, I think you'll need to pass that file as an argument to the executable to handle it.

Re: OS Execute from within tool

Posted: Wed Feb 19, 2014 2:17 am
by Lukas
Thanks, I'll check it out.

Re: OS Execute from within tool

Posted: Wed Feb 19, 2014 2:24 am
by Lukas
Again, thanks for the reply.
Eventually it had nothing to do with the os.execute command.
I used debug.getinfo(1).short_src to get the path of the folder in which te lua script is located.
But because the path was longer than 60 characters, the path was abbreviated.
Now I use debug.getinfo(1).source and the problem has been solved,....for now