Create action with script?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Create action with script?

Post by dkwroot »

Is it possible to create new actions using a script?
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Create action with script?

Post by synthsin75 »

Yes, if I remember correctly, you just have to open an action for editing, but provide it with a new name that doesn't already exist as an action. Moho will then create an action with that new name.


EDIT: Yeah, it should be moho:ActivateAction(const char *name), with the argument being the new name.
dkwroot
Posts: 677
Joined: Thu May 02, 2013 6:56 am
Location: USA
Contact:

Re: Create action with script?

Post by dkwroot »

Thank you, moho.layer:ActivateAction(const char *name) works like a charm.
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Create action with script?

Post by synthsin75 »

Oh yeah, forgot it was a layer function.
Post Reply