Script Entity Type

The Script Entity Type for Interaction generates entity values using a script in LISP other scripting languages such as AppleScript, HyperTalk, or UserTalk/Frontier.

The component adds a new Script entity type to the New Entity dialog. The entity type provides an editor to write the script, with a pop-up menu to choose the language:

Here is a simple example of a script entity. Say that you want to create an entity that embeds a random value from zero to nine:

  1. Select New Entity from the File menu.
  2. Choose Script from the pop-up menu for Entity Types.
  3. Type in "random" as the name for the entity and click the Create button to complete the dialog.
  4. Type in the LISP code (random 10) in the editor that appears on your creen.
  5. Close the editor. You will find a new item in the Entities dialog named "random".
  6. Use the entity reference &random; to embed the random value in any of the documents of your site.

The example in the snapshot above is a more substantial example based on the same idea. It provides one of three values at random, in effect implementing a Random Entity.

Installing the Script Entity Type Component

  1. Download the Script Entity Type archive.
  2. Unstuff the archive (most browsers will do this for you).
  3. Find the appropriate version of the component in the folder that best matches your version of Interaction.
  4. Put the component file in the Components folder of Interaction
  5. Restart Interaction to activate the component.

The AppleScript Tools component is required to use other languages than LISP such as AppleScript, HyperTalk, or UserTalk/Frontier (TM) in Script entities.


This site is enhanced with Interaction.