We are in the process of migrating the Spacial Wiki content to our new Help Center at spacial.com.
Please visit the Help Center for latest Tips and Tricks, Documentation and Troubleshooting.

PAL Scripting - "Hello World" Example

From SpacialAudio

Jump to: navigation, search

PAL Scripting - "Hello World" Example

This section gives a quick start in getting a PAL or Playlist Automation Language script working. PAL is a fully featured programming language embedded directly into SAM Broadcaster that allows control of almost every aspect of SAM and playlist rotation logic.

  • Step 1: In SAM Broadcaster go to the menu option Menu->Window->PAL scripts and activate the PAL script window.
  • Step 2: Click on the Add ("+") button. This will open the script options dialog.
  • Step 3: Next to the script source file, click on browse ("folder") button located to the right of the edit field. Enter the name of the script you want to load, or, if the script does not exist, the name of the script to create. For this example, it is "Guide.PAL". Click OK. (If prompted to create the file, select yes...)
  • Step 4: The Guide.PAL script entry will appear inside the PAL Scripts window. Double-click on the Guide.PAL entry to open up the PAL IDE.
  • Step 5: Inside the PAL IDE type the following text:
WriteLn('Hello world!');
  • Step 6: Click on the Run button (or press [F9] ).

The BLUE line shows which line is being executed, and the output is written on the right hand side of the PAL IDE. (It will show "Hello world!".) The status of the script in the status bar will also be displayed in the PAL IDE.

Congratulations! You have just entered the awesome world of radio automation scripting!

Some more examples:

you will find 3 examples
Example 1 - Simple Category Based Rotation
Example 2 - Running an Advertisement
Example 3 - Running a show a specific time
More about PAL scripts'

Related links

Personal tools