crackmaster Posted July 8, 2008 Share Posted July 8, 2008 (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 July 8, 2008 by crackmaster Link to comment Share on other sites More sharing options...
Airwolf Posted July 8, 2008 Share Posted July 8, 2008 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 everybodyPost 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 Link to comment Share on other sites More sharing options...
crackmaster Posted July 8, 2008 Author Share Posted July 8, 2008 (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 July 8, 2008 by crackmaster Link to comment Share on other sites More sharing options...
Airwolf Posted July 8, 2008 Share Posted July 8, 2008 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 muttleyUse 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 Link to comment Share on other sites More sharing options...
crackmaster Posted July 8, 2008 Author Share Posted July 8, 2008 (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 July 8, 2008 by crackmaster Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now