Note that this Wiki is a work in progress, items may not be updated or may disappear entirely as the pages are updated.
PAL Scripting - "Hello World" Example
From SpacialAudio
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 SAM3 that allows control of almost every aspect of SAM and playlist rotation logic.
Step 1: In SAM4 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: * Using Pal For Category Based Rotation
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'
