Database and playlist export commands

I have several questions that I have not been able to find answers for in the documentation and would be extremely grateful if anybody could help me with any of the issues. Thanks in advance.

[ul][li]Is there a way to run a script that would save the current playlist? I believe I have found some related documentation in the mAirListScript.chm documentation, but as I have never used the mAirList script I was unable to understand the parameters and how to use them.[/li][/ul]

[size=3pt].[/size]

[ul][li]Is it possible to change the default functions of the open and save buttons? By default they open/save desktops(mld) but I was wondering if it would be possible to change them to save/open playlists(mlp) by default rather than requiring selection in the dropdown menu[/li][/ul]

[size=3pt].[/size]

[ul][li]Is there any command that could be used to export the database to CSV either from a mAirList script or as an external command from windows for use as a regular automated export.[/li][/ul]

Again, thanks in advance for any help, Joel

Here’s how to save the current playlist from a script - the file format will be determined by the extension, so this method works for .mlp, .m3u etc.:

begin
  CurrentPlaylist.SaveToFile('c:\something.mlp');
end.

Open and Save button: There’s an option for that on the “GUI” page in the configuration.

Export as CSV from a script: Looking at the code, I’d say it’s almost impossible at the time being, but perhaps I can tweak something.

Ah.

In that case, it seems I haven’t understood the purpose of that Config setting. :o

My understanding was that the GUI setting changed whether Open/Save applied to the FIRST Playlistor to the ACTIVE (selected) Playlist, assuming you have two or more Playlists. I assume that is wrong? If so, I’ll update the English Manual!

BFN
Cad

It actually toggles between “Open (or save) desktop” and “open (or save) first playlist”.

Sorry that I didn’t notice that mistake in the manual.

It certainly makes more sense for the option to work that way!

Manual now fixed and Revision 18 has been uploaded.

BFN
Cad

Thanks for the help, I had found the option for the save and open playlists but was unable to get on the forums. Thanks for the help with the script aswell, I understand the general script slightly better aswell now, thanks…
On another note, I notice that in the GUI tab there is an option to change whether the browser is saved within the desktop or not, is there a way to change this for the playlist as currently everytime something is added to the playlist, when you try to close mAirList you are asked to save the desktop?

No, the playlist is always considered part of the desktop.

OK, so the always asking to save the desktop on close is unsolveable?

You can turn off the confirmation dialog in the config (sowhere under GUI, if I remember correctly).

OK, thanks, I will have a look.

–EDIT–

Oh yes, that was easy. Its under the top level GUI menu ‘Show Save Confirmation’
Thanks :slight_smile: