AppleScript

From The Foundry MODO SDK wiki
Revision as of 22:09, 12 December 2012 by Conorfitz (Talk | contribs)

Jump to: navigation, search

modo 601 SP3 adds minimal support for AppleScript on Mac OS X. This allows modo to receive commands from AppleEvents/AppleScript. The greatest benefit is that it allows other apps to do the same using Cocoa's AppleScript bridge.

This is a minimal implementation of AppleScript, and is only able to executing commands; queries are not supported at this time. This limits its usefulness as a general scripting system per say. It is primarily intended to allow third party applications to issue basic commands to modo.

Commands are executed by issuing run command followed by the command string. Note that since the command is encased in quotes, any internal quotes must be escaped.

run command "command"

For example:

tell application "modo"
  run command "poly.setMaterial \"hello world\" {0.0 1.0 1.0} 0.8 0.2 true false"
end tell

Remember that modo only supports executing commands at this time. This makes it similar to the modo's Windows DDE implementation.

More Information