script question

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
toonertime
Posts: 595
Joined: Tue Feb 27, 2007 8:34 am
Location: ST. LOUIS

script question

Post by toonertime »

i noticed that after i have placed a few of the
scripts, like the reverse frames script, in
the script tools file, in AS i get a little box
in the Other section of the tools with a
red X and a question mark. The script is
described but will not run. I have 3 scripts
like this. What am I doing wrong?
User avatar
synthsin75
Posts: 9972
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

You can just drop tool scripts in and they'll work, but button scripts need to be added to the _tool_list.txt file. You have to do this so that AS knows it is a button. Like this:
button <exact script file name> ...
User avatar
toonertime
Posts: 595
Joined: Tue Feb 27, 2007 8:34 am
Location: ST. LOUIS

Post by toonertime »

i will give it a go. Thank you for all
your great guidance and feedback!
User avatar
toonertime
Posts: 595
Joined: Tue Feb 27, 2007 8:34 am
Location: ST. LOUIS

Post by toonertime »

this was the file i put in the scripts/tools folder
cc_reverse_layer_keyframes

do i declare it a button?
User avatar
synthsin75
Posts: 9972
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Had to look that one up, since I've never used it. But yeah, that's a button script, so you'd add it to the tool list as:
button cc_reverse_layer_keyframes ...
Note, the '...' can be replaced with any free shortcut key if you want. You can also just drop this into a 'menu' script folder to use it from there (ASPro only).

Also, if you're using Windows, scripts that immediately open a dialog will run twice if used as a button. Just cancel the second time it runs. :wink:
User avatar
toonertime
Posts: 595
Joined: Tue Feb 27, 2007 8:34 am
Location: ST. LOUIS

Post by toonertime »

thanks for the advice on dropping it
into the menus script. It is a nice
script for reversing animation
automatically!
Post Reply