Ik zal even een stukje uit de SAM-bijble hierover citeren :
Some warnings about PAL scripting
PAL scripting is a powerful programming language. With this power comes a lot of responsibility.
Incorrectly written PAL scripts can have many bad side effects, those include:
1. Cause SAM to lock up/freeze.
2. Cause exception errors in SAM, affecting the stability in SAM.
3. Although PAL does automatic garbage collection on script restart, it is possible to write scripts that consume all available memory if memory allocation is done in long-running loops.
4. PAL gives you direct access to your SQL database. It is possible to use SQL queries to completely erase or destroy the database and data integrity.
5. PAL gives you the power to work with files on your local hard disk and network. PAL can be used to delete or modify files.
2.1.1 Importing or exporting files to/from the media library
Importing
You can add files to either a category or directly to the queue using various PAL commands.
A few examples:
CAT['MyCategory'].AddDir(‘c:\music\’, ipBottom);
CAT['MyCategory'].AddFile(‘c:\music\test.mp3’, ipBottom);
CAT['MyCategory'].AddList(‘c:\music\playlist.m3u’, ipBottom);
CAT['MyCategory'].AddURL(‘
http://localhost:8000/test.mp3’, ipBottom);
The same commands can also be used for adding files to the queue
Queue.AddDir(‘c:\music\’, ipBottom);
Queue.AddFile(‘c:\music\test.mp3’, ipBottom);
Queue.AddList(‘c:\music\playlist.m3u’, ipBottom);
Queue.AddURL(‘
http://localhost:8000/test.mp3’, ipBottom);