Documentation of the Scripting API

Vision or Stages can be expanded greatly with scripts. Scripts can take influence on playing, and also enhance the user interface.

First of all: It goes deep into the "guts" of the SlideShow. You should already possess basic programming knowledge to get started with this functionality.

1. How do I use scripts?

To each slideshow object, a script can be appended, which comes to execution at different times. A script is ultimately just a text file. The time that each part of a script is executed is determined by Hooks. A Hook is nothing more than a specially named function within the script. Using the Scripting development environment, you can assign a script to a slideshow object or create new scripts.

2. Additional information

3. Example

A very simple example of a script might look like this. This example defines a movement path, e.g. for an image or text:

procedure OnExpandSlideShow(SlideShowObject: ISlideShowObject)
begin
  var Moveable = SlideShowObject as IMoveable;
  if Moveable = nil then
    Exit; // Cancel, because object has no movement path
   
  Moveable.SetDefault; // remove existing path completely
  var Item: ITimeRect;
   
  // First movement mark (always present)
  Item := Moveable[0];
  Item.SetBounds(DoubleRect(0.25, 0.25, 0.75, 0.75); // half of the screen 
   
  // Add second movement mark
  Item := Moveable.AddItem;
  Item.SetBounds(DoubleRect(0.0, 0.0, 1.0, 1.0);  // fullscreen
  Item.SetTime(SlideShowObject.Duration div 2); // Time when the second mark should be reached
end;