Creating a UI Script

  1. From the main menu select Edit/Customize User Interface.
  2. In the shortcut menu select the item labeled 'Scripts'. The treeview will now display a list of all the UI scripts.
  3. In the treeview, right click the 'Scripts' node and select New/UIScript/LuaUIScript from the context menu and give the new script an appropriate name. This object will run a LUA script when it's invoked.
  4. Select the ScriptCode property and click the ... button to show the script editor dialog.
  5. Enter the following code into the editor 'print('hello world')' and click the 'OK' button.
  6. Now to test out the script, click the Invoke button shown in the script's properties. Notice that 'hello world' was printed in the output pane.
  7. To write more useful scripts consult the fragMOTION Type Library for descriptions of all the interfaces supported by the object hierarchy.


Copyright 2004 Fragmosoft