I’m trying to put a script together that will load the standard.mld/mlt file which restores the events file, cartwall and browser settings. Reason being, some presenters are closing the Browser panes and although we can get them back through the drop-down arrow button - I’d like to add a script to our “Actions” button that just restores mAirList to an initial state and loads the current hour…
However, I’m having trouble getting the file to load the cartwall and browser… Here’s the portion of script that’s not working:
begin
Playlist(0).LoadFromMLD('C:\Program Files\mAirList\standard.mld', false);
SystemLog('Restored mAirList for Phoenix FM...');
end.
I had a look through the script interface Help file, and LoadFromMLD only exists as a method for an IPlaylist object; ergo, it’s not possible to use that method to (re-)load the Browser and/or Cartwall, and there does not seem to be an equivalent method for either of those objects.
I can’t unfortunately see anything in that Help file which duplicates the effect of the Open Desktop menu item (though logically, there must be a method of the [undocumented] IInterface object which does this).
We’ll need to wait until Torben answers this. Sorry I can’t help!
Reading/writing desktop files is handled within the GUI, as they also affect objects outside the engine, in particular the browser. However, scripts do not have any access to the GUI at the moment, as I have not yet defined any interfaces for that. I’ll put it on my list.
And yes, Cad, you’re right. IPlaylist does have a LoadFromMLD method, but it only extracts the data of the first playlist from that file.
OK, thanks for trying… I’ll instruct people to close-down mAirList and re-start it if they are really stuck with losing the Directory Tree and Database Search… A simple Action button to fire a script would have made our lives (and mobile phones) a tad quieter
Try this, making the hopefully obvious substitutions, having set [DefaultDirectories] appropriately in the mAirList INI file, and previously saved a Standard.mld Desktop file with the Browser and Cartwall appropriately set up:
[glow=blue,1,75]------------------------------ CUT HERE ------------------------------[/glow]
To restore the Browser contents, do this:
Right-click the Playlist, then click This Playlist, Save as…
Make sure the Save in: box reads .
In the Save As box, type RESTART, then press Enter.
In the mAirList menu, click Open, Open Desktop.
Double-click standard.mld.
Right-click the Playlist, then click This Playlist, Load…
Make sure the Load from: box reads .
Double-click RESTART.mlp.
[glow=blue,1,75]------------------------------ CUT HERE ------------------------------[/glow]
Hope this helps! You can always write scripts (and assign them to Actions) to save the current Playlist contents to a set location, and to restore it again after the Standard Desktop file is loaded: that will simplify the instructions even more. Then print the instructions out up and (ideally!) laminate the sheet; then make sure it is always in the studio.
Thanks for that, Cad… I’ve got all the default folders and locations set as part of “standard” - This is the main thing: File Browser and Cartwall. We do have the Cartwall presets on the Favourite Dropdown bar, too. The other thing about instructions is that people don’t read them! You’d be surprised the questions I’ve had despite there being a nice A4 sheet on the studio window not 2ft from the mAirList screen.
I was tempted to remove the “Close” button on the File Browser but as many of our presenters bring specialist music in on their USB memory sticks, it’s helpful that they can close the folder after their show - Occasionally, the drive letter isn’t the same, otherwise I’d do that.
However, what I will do is use your renaming trick on the long path names on our File Browser!