My new mAirlist layout...

Er … when you open a DOS prompt in Windows 2000 or later, it usually starts in the user’s Documents and Settings directory. So it’s unlikely that it will find any program there!

Lackster:

  1. You need to make sure the RANDOM_PLAYLIST_EXE_DIRECTORY value in your script matches the directory where you have put the random_playlist.exe file.

  2. You need to use := and NOT just = to assign values to variables. This is Delphi/Pascal, not VB (unfortunately! ;)).

  3. Don’t split the statement which begins RANDOM_PLAYLIST_EXE_DIRECTORY := over two lines.

    BFN
    CAD

Hi Cad, we have no problems with the script just using = without the :

I think the script concerned only uses constants.

Agree though, do not split parts of the script over 2 (or more) lines.

Kind Regards tony

Yep, I confirm what Tony says. In “const” block, this is the “=” (not the “:=”) used for assigning values to variable.

Oops! :-[ Yes of course you are both correct. That ALWAYS trips me up!

[FX: mutter, grumble, s–ding inconsistent Pascal syntax, etc., etc.]

BFN
CAD

ok, i have made sure that notepad doesnt split onto two lines now, i have tried it with : and without :. When i did use : it gave me another error saying it was expecting = instead.

i have tried all suggestions, even tried getting rid of the gap between the = and the ‘SCRIPT’

Still though i am having no luck!!

What i have also tried is creating a random playlist folder so it is exclusive to this script (just in the hope) but still i am getting the same error message about it loading a playlist!

:frowning:

Maybe before christmas we’ll get to the bottom of this!! :wink:

Hi Lackster, tried your script again. Sure I said this earlier in the thread but the folder path gets broken by using FOLDER\FOLDER - FOLDER

Remove the spaces and - then use underscores - it should work

FOLDER\FOLDER_FOLDER

You will need to rename your folders.

Hi Tony,

Can i just check which bit you mean please. i have changed folders and am still getting the problem with the following drive path

‘C:\Documents and Settings\Phil\My Documents\My Music\Amazon MP3\Calvin Harris\I’‘m Not Alone’;

Is it the spaces, so therefore it would need to be:

‘C:\Documents and Settings\Phil\My_Documents\My_Music\Amazon_MP3\Calvin_Harris\I’‘m_Not_Alone’;

Many Thanks

Hi Lackster, also change the script to match.

Heres a snippet from the script I use:

[code] // Change the values here for your current settings.
RANDOM_PLAYLIST_EXE_DIRECTORY = ‘C:\TWIN PLAYER\random_playlist_v3’;
RANDOM_PLAYLIST_EXE_FILENAME = ‘random_playlist_v3.exe’;
TIME_TO_WAIT_BETWEEN_GENERATION_AND_LOAD = 2; // in seconds

DIRECTORY_TO_SEARCH = 'C:\AUDIO\A';
EXTENSION_TO_SEARCH = 'MP3';
NB_ITEMS_TO_LOAD = 2;[/code]

You are also going too deep through the folders, I expect you will get the error too many parameters. look at my example I am looking in a folder called a located within audio on the C drive. After this the script results in the error I mention.

Kind Regards tony

Ahh, so that means i need to change the name of all them directories on my computer to get it to work?

Does that mean things like MY MUSIC and MY DOCUMENTS need changing to MY_DOCUMENTS etc?

It sounds a bit odd to me to have to change everything, but if thats what it takes then im happy!

Hi Lackster, Just the path to search - it will be easier to move the music out of my documents into a folder called Audio on the C Drive, use sub folders to categorise your music.

Kind Regards tony

in those subfolders do i need to use _ e.g. 60’s_A or can you get away with subfolders and just have to have it on the root folder e.g. C:\MY_AUDIO\60’s A

Hope that makes sense!

going on what you said tony, as a tester, i made a folder ‘AUDIO’ on the C:, pasted 15 records into it, i also pasted the random_playlist.mls and the .exe into that folder. At the same time i changed the script to the new locations and i am still having the same problems!

Just for you to double check, this is what i have changed the script to:

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

DIRECTORY_TO_SEARCH='C:\AUDIO\';
EXTENSION_TO_SEARCH='mp3';
NB_ITEMS_TO_LOAD=5;

Hopefully doing that will narrow things down slightly.

I am using the very latest available snapshot currently, has anything been changed in the last week that could have caused these problems. just wondering if my version is an even more recent version than your latest snapshots?

-clutching at straws yes! :smiley: -

Hi Lackster, remove the last \ on the directory to search.

It becomes DIRECTORY_TO_SEARCH = ‘C:\AUDIO’;

On sub folders remove ’ spaces and use underscores;C:\MY_AUDIO\60’s A
becomes C:\MY_AUDIO\60_s_A

btw:No new snapshots to download.

Kind regards tony

Super, thanks for your patience.

I will give it a go tomorrow…

Ok, im getting somewhere now!! HURRAH!!!

the problem was witht the script:

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

DIRECTORY_TO_SEARCH=‘C:\AUDIO’;
EXTENSION_TO_SEARCH=‘mp3’;
NB_ITEMS_TO_LOAD=5;

What i did was delete the \random_playlist_v3 part from the Playlist_directory line and then it fired away as it should do!

However

When i try it on the main machine i want it to work on it comes up with a box saying “TOO MUCH PARAMETERS” which is an error given by the .exe so it seems.

Any ideas on what this means?

I feel we are very nearly there now :slight_smile:

Okay, even though in most cases it says too many parameters, it doesnt seem to matter as it still loads the audio anyway. therefore im satisfied that this is now working.

Thank you all for you help with the problems i have had. Sorry to anybody who is now bald as a result.

Best Wishes

Lackster

P.s. Another script possibility to go along side this one is in the scripts folder…

Lackster, this code should sort things out:

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

DIRECTORY_TO_SEARCH=‘C:\AUDIO’;
EXTENSION_TO_SEARCH=‘mp3’;
NB_ITEMS_TO_LOAD=5;

Note the removal of \ on the directory to search.

Lackster, if you get he error “too much parameters”, I think it doesn’t work very well.
Could you check but I imagine this is always the same playlist (same order) that is loaded in mAirlist. With a correct launch, the playlist is replaced by a new one. With the error you mentioned, the previous file is kept, but not replace. So you load the same playlist as before.

The “Too much parameters” is launched when you call “random_playlist.exe” program with more than 3 parameters. It’s the mAirlist script that calls the program with parameters.

You should not had modified the line beginning with “ShellExecuteHidden” which calls the program with the needed parameters.
Did you try with the code Tony gave you just before ?

Oh, and could you explain me the “P.s. Another script possibility to go along side this one is in the scripts folder…”. I didn’t understand what you mean…

Hi Theo,

I didnt change any scripting in the bit where you said (shellexecute). It was simply a \ too many that was causing the problem.

You are correct about it loading the same playlist over and over but i have now managed to resolve that issue.

can i just check though, too many parameters is C:\xxx\xxx\xxx (simply too many locations to go through).

The P.s. bit simply meant for you to have a look in the scripts area at another post i made.

Many Thanks

So, everything is okay now ? no screen error ? playlist different at every launch ?