Sign in to follow this  
Followers 0
crackmaster

Not urgent but i need it :)

5 posts in this topic

#1 ·  Posted (edited)

First of all, i want to say hello to everyone, i am new here, bla, bla, bla muttley ... I need something like this: i want to make one .m3u playlist with from other 3 playlists. But here is the f**k: i need to read one line randomly from first playlist, 4 lines from 2nd and one line from 3rd playlist. Never read same lines. Iv'e try to do this, but there was no luck... You people are my last hope... Thanks to everybody

Edited by crackmaster

Share this post


Link to post
Share on other sites



First of all, i want to say hello to everyone, i am new here, bla, bla, bla muttley ... I need something like this: i want to make one .m3u playlist with from other 3 playlists. But here is the f**k: i need to read one line randomly from first playlist, 4 lines from 2nd and one line from 3rd playlist. Never read same lines. Iv'e try to do this, but there was no luck... You people are my last hope... Thanks to everybody

Post your code and we'll help you fix the problem.

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Post your code and we'll help you fix the problem.

Heh... I just wrote few lines (and test line by line), but as you know, i don't have any luck...

My biggest problem is that i don't know how to read random lines (.m3u playlist contains two lines per song), so i need to read both lines - randomly... I know that this is primitiv script, but i am begginer & i looking for some help muttley

Edited by crackmaster

Share this post


Link to post
Share on other sites

Heh... I just wrote few lines (and test line by line), but as you know, i don't have any luck...

My biggest problem is that i don't know how to read random lines (.m3u playlist contains two lines per song), so i need to read both lines - randomly... I know that this is primitiv script, but i am begginer & i looking for some help muttley

Use the Random() function.

$file = FileOpen("playlist.m3u")
$random = Random(1,10,1) ; random number between 1 and 10
$line1 = FileReadLine($file,$random)
$line2 = FileReadLine($file,$random + 1)

Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Use the Random() function.

$file = FileOpen("playlist.m3u")
$random = Random(1,10,1) ; random number between 1 and 10
$line1 = FileReadLine($file,$random)
$line2 = FileReadLine($file,$random + 1)

Wow, thanks!

It work, but it write one line... I will try do rest by my own muttley THANKS for now :)

Edited by crackmaster

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0