My new mAirlist layout...

Hi Theo, well done unfortunately with the latest version 3 snapshot the error generated is below.

Kind regards tony

[Error] (31:18): Unknown identifier ‘LOADFROMM3U’

01 April 2009, 23:01:44

Program Version 3.0.0 Build 533

Call stack:

(004DFA35) [008E0A35]
(0050EDB0) [0090FDB0]
(004E0485) [008E1485]
(00259702) [0065A702]
(001CE8CD) [005CF8CD]
(0002E37F) [0042F37F]
(00081081) [00482081]
(00081D48) [00482D48]
(0002E24B) [0042F24B]
(00071FED) [00472FED]
(000BEFAC) [004BFFAC]
(0007247F) [0047347F]
(00071AFF) [00472AFF]
(0000EBDA) [0040FBDA]
(0007178C) [0047278C]
(0007521E) [0047621E]
(000752E6) [004762E6]
(0007178C) [0047278C]
(000754F1) [004764F1]
(00075857) [00476857]
(000C0F3D) [004C1F3D]
(000C0F7E) [004C1F7E]
(000C37C5) [004C47C5]
(00075128) [00476128]
(0002EA20) [0042FA20]
(0002F2A6) [004302A6]
(0008F7AC) [004907AC]
(0008F7E6) [004907E6]
(0008BDE7) [0048CDE7]
(00203DBE) [00604DBE]
(0002E37F) [0042F37F]
(00081081) [00482081]
(00081D48) [00482D48]
(0002E24B) [0042F24B]
(00071FED) [00472FED]
(000BEFAC) [004BFFAC]
(0007247F) [0047347F]
(00071AFF) [00472AFF]
(0000EBDA) [0040FBDA]
(0007599D) [0047699D]
(0007178C) [0047278C]
(0007521E) [0047621E]
(000752E6) [004762E6]
(0007178C) [0047278C]
(000754F1) [004764F1]
(00075857) [00476857]
(000C0F3D) [004C1F3D]
(000C0F7E) [004C1F7E]
(000C37C5) [004C47C5]
(00075128) [00476128]
(0002EA20) [0042FA20]
(0002F2A6) [004302A6]
(0008F7AC) [004907AC]
(0008F7E6) [004907E6]
(0008FA06) [00490A06]
(0048486A) [0088586A]
(00484970) [00885970]
(0050F4F0) [009104F0]
(00519C80) [0091AC80]

In mAirlist v3, you have to replace “LoadFromM3U” by “LoadFromFile”…

Cheers Theo, quick test and the error becomes:

Runtime error: (31,2) Exception: Error loading playlist: Unknown file extension.

02 April 2009, 15:39:28

Program Version 3.0.0 Build 533

Call stack:

(004DFB33) [008E0B33]
(0050EDB8) [0090FDB8]
(004E0485) [008E1485]
(00259702) [0065A702]
(001CE8CD) [005CF8CD]
(0002E37F) [0042F37F]
(00081081) [00482081]
(00081D48) [00482D48]
(0002E24B) [0042F24B]
(00071FED) [00472FED]
(000BEFAC) [004BFFAC]
(0007247F) [0047347F]
(00071AFF) [00472AFF]
(0000EBDA) [0040FBDA]
(0007178C) [0047278C]
(0007521E) [0047621E]
(000752E6) [004762E6]
(0007178C) [0047278C]
(000754F1) [004764F1]
(00075857) [00476857]
(000C0F3D) [004C1F3D]
(000C0F7E) [004C1F7E]
(000C37C5) [004C47C5]
(00075128) [00476128]
(0002EA20) [0042FA20]
(0002F2A6) [004302A6]
(0008F7AC) [004907AC]
(0008F7E6) [004907E6]
(0008BDE7) [0048CDE7]
(00203DBE) [00604DBE]
(0002E37F) [0042F37F]
(00081081) [00482081]
(00081D48) [00482D48]
(0002E24B) [0042F24B]
(00071FED) [00472FED]
(000BEFAC) [004BFFAC]
(0007247F) [0047347F]
(00071AFF) [00472AFF]
(0000EBDA) [0040FBDA]
(0007599D) [0047699D]
(0007178C) [0047278C]
(0007521E) [0047621E]
(000752E6) [004762E6]
(0007178C) [0047278C]
(000754F1) [004764F1]
(00075857) [00476857]
(000C0F3D) [004C1F3D]
(000C0F7E) [004C1F7E]
(000C37C5) [004C47C5]
(00075128) [00476128]
(0002EA20) [0042FA20]
(0002F2A6) [004302A6]
(0008F7AC) [004907AC]
(0008F7E6) [004907E6]
(0008FA06) [00490A06]
(0048486A) [0088586A]
(00484970) [00885970]
(0050F4F0) [009104F0]
(00519C80) [0091AC80]

Will have a play.

Kind Regards Tony

Ok, there was some mAirlist v3 instructions that doesn’t work like I hope.

So, I made two version, available here :
for mAirlist v2.2 (latest snapshot) : http://filo.billy.free.fr/random_playlist_v2.zip
for mAirlist v3.x (latest snapshot) : http://filo.billy.free.fr/random_playlist_v3.zip

I tested both : all is okay :slight_smile:
Let me know.

Cracking. Thank you Theo, this is something long asked by users.

The orignal worked fine in version 2 of mAirList, the latest uploads work fine in verion 3 too.

I’m sure many will find this of great use.

Can you take things further and append to a playlist rather than loadfromfile as this removes anything already in a playlist.

Thanks again.

Kind regards tony

Tony,

Could you download again the files : I made the modification you ask to.
It’s okay now.

Hi Theo, quick work.

Thanks again, script will help many.

Kind Regards Tony

Hi Theo,

Haven’t had chance as yet to give it a go, just wanted to say thanks for being so speedy in creating this.

Best Wishes

Lackster

It’s quite simple Lackster ^^
If you want to get another “simple” utility, it’s okay for me. Just let me know, I will see what I can do for you. It takes me few hour to implement them…
It’s okay for you and the other community members, of course :wink:

Don’t forget that mAirlist, which is already very powerful, linked to AutoIT (free) for designing extra utilities, are the most efficient couple of softwares !! With both, you can do almost everything you want ! 8)

At the moment, it’s quite annoying that mAirlist cannot access to GUI event, like the selected item in playlist or browser and so on, but when it will be implemented (I hope they will), it will be wonderful !! ;D

Just trying to load the script, can’t seem to get it to work quite!

i have put in the right details, or so i believe.

I did also try to simply load the random_playlist.exe and that loads an error - parameters missing

Any ideas?

In the script i added the following:

const
// Change the values here for your current settings.
RANDOM_PLAYLIST_EXE_DIRECTORY = ‘C:\Program Files\mAirList\scripts’;
RANDOM_PLAYLIST_EXE_FILENAME = ‘random_playlist_v3.exe’;
TIME_TO_WAIT_BETWEEN_GENERATION_AND_LOAD = 2; // in seconds

DIRECTORY_TO_SEARCH = 'I:\60's\60's A';
EXTENSION_TO_SEARCH = 'MP3';
NB_ITEMS_TO_LOAD = 5;

Hope this helps.

I’m also getting the following error message:

Error loading C:\program files…\scripts\random_playlist.mls: [errpr] (16:31): semicolon (’;’) expected

Thanks

Hi Lackster, try changing this line

RANDOM_PLAYLIST_EXE_DIRECTORY = ‘C:\Program Files\mAirList\scripts’;

to

RANDOM_PLAYLIST_EXE_DIRECTORY = ‘C:\Program Files\mAirList\scripts’;

Kind Regards tony

hmmm, strange.

I have changed that like you said, and i did the same thing for the DIRECTORY_TO_SEARCH line also.

Still get the same thing where nothing seems to be popping up or happening and im still getting the same error when trying to load the .exe - parameters missing.

just tried loading mairlist and still getting the error message also - about semicolons!

Thanks

Hi Lackster, adding the \ to the line directory to search is most likely recreating the same problem further in the script. Remove the \ from the line directory to search and see what happens.

You also need the very latest snapshot of mAirList.

Kind Regards tony

Just downloaded the latest snapshot and deleted the \ from the DIRECTORY_TO_SEARCH line - unfortunatly its still giving exactly the same problem!

Here is an exact copy of the script, just incase it helps!

{--------------------------------------------------------------------------------------
Generates a random playlist from a directory and audio files, and load it to mAirlist.
Require the “random_playlist.exe” file for correctly working.

Author: Theo
Date: 2009-04-01

See http://www.mAirList.com for further information.
---------------------------------------------------------------------------------------}
const
// Change the values here for your current settings.
RANDOM_PLAYLIST_EXE_DIRECTORY = ‘C:\Program Files\mAirList\scripts’;
RANDOM_PLAYLIST_EXE_FILENAME = ‘random_playlist_v3.exe’;
TIME_TO_WAIT_BETWEEN_GENERATION_AND_LOAD = 2; // in seconds

DIRECTORY_TO_SEARCH = 'I:\60's\60's A';
EXTENSION_TO_SEARCH = 'MP3';
NB_ITEMS_TO_LOAD = 5;

// Do not touch what is below.
var
Playlist_to_append : IPlaylist;
begin
// Launch the exe file for generating the temporary random playlist.
ShellExecuteHidden(RANDOM_PLAYLIST_EXE_DIRECTORY + RANDOM_PLAYLIST_EXE_FILENAME, DIRECTORY_TO_SEARCH + ’ ’ + EXTENSION_TO_SEARCH + ’ ’ + IntToStr(NB_ITEMS_TO_LOAD));

// Wait until the specified time before loading the playlist.
sleep(TIME_TO_WAIT_BETWEEN_GENERATION_AND_LOAD*1000);

// Do not change the name of the file because it's this name that is generated by the exe file.
Playlist_to_append := Factory.CreatePlaylistFromFile(RANDOM_PLAYLIST_EXE_DIRECTORY + 'playlist.m3u');
CurrentPlaylist.AppendPlaylist(Playlist_to_append);

end.

Hi Lackster, are you actually pointing to the exe?

You seem to just be pointing to the script folder, the missing part of the line would be:

random_playlist_v3\

making the complete line:

RANDOM_PLAYLIST_EXE_DIRECTORY = ‘C:\Program Files\mAirList\scripts\random_playlist_v3’;

Assuming that is where the exe file is.

I seem to recall mairList does not like spaces in a path which could also explain things. Try renaming the folder 60’s A to 60’s_A and change the script to suit.

Kind Regards Tony

Lackster, your error is here :

[tt] DIRECTORY_TO_SEARCH = ‘I:\60’s\60’s A’;[/tt]

You can’t use the " ’ " (quote) in your folder name because it’s a symbol that is use by mAirlist to delimitate string variable…
So, whether you rename your folder without the quote (example : ‘I:\60s\60s A’), whether you put a double quote, like ‘I:\60’‘s\60’‘s A’.

As you wish…
If you don’t want to rename your folder, try the second solution
[tt] DIRECTORY_TO_SEARCH = ‘I:\60’‘s\60’‘s A’;[/tt]

Enjoy !

Oh, and you can’t load the random_playlist.exe by double clicking on it.
This piece of software needs 3 parameters to be launched.

You should create a shortlink, or tape in a console terminal :
[tt]random_playlist D:\My_mp3_directory mp3 20[/tt]

Lots of answers, Lots to try, Thank You all very much.

Will try and give it a go shortly, many thanks for your replies.

Great, that has got rid of that error message!

I have just tried to open and now i get the [error] (29:2): unknown identifier ‘sleep’

I have got the latest snapshot downloaded.

Any ideas?

Many thanks.

v2.2 or v3.0?