Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 10, 2016, 06:37:38 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: [FBSL] M3u list generator  (Read 2167 times)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
[FBSL] M3u list generator
« on: September 09, 2006, 05:02:44 AM »
Hello,

For people who cares about generating rapidly an M3u list, here's a quick tool that will do it for you.

Just compile it with FBSL and place the compiled file into a known path.

Then from any command line or alike (FARR), you just have to change dir and execute M3u.exe.
Nothing else to do, then the M3u list file will be generated into the target dir!

Enjoy it! 8)

Code: vb.net [Select]
  1. #Option Explicit
  2. #AppType Console
  3.  
  4. ' ----------------------------
  5. ' -- M3u list generator
  6. ' -- GEG 09-09-2006
  7. ' ----------------------------
  8.  
  9. M3u(".\*.mp3", ".\_List.m3u")
  10.  
  11. Sub M3u($what, $where)
  12.         CD CurDir()
  13.         Dim %fp, $c, $big, $fil = FindFirst(what), $m3u = where
  14.  
  15.         While fil <> ""
  16.                 big = big & fil & CRLF
  17.                 fil = FindNext
  18.         Wend
  19.  
  20.         If Len(big) Then
  21.                 fp = FileOpen(m3u, OUTPUT)
  22.                 If fp Then
  23.                         FilePrint(fp, big)
  24.                         FileClose(fp)
  25.                 Else
  26.                         Print "Error while opening ", m3u
  27.                 End If
  28.         End If
  29.  
  30.         Print "Do you want to hear the playlist now [Y]es, [N]o ?";
  31.         Do
  32.                 c = UCase(ReadChar())
  33.         Loop While c = CR OrElse c = LF
  34.  
  35.         If c = "Y" AndAlso FileExist(m3u) Then
  36.                 ApiCall("ShellExecute", "Shell32", NULL, "open", m3u, "", "", SW_SHOW)
  37.         Else
  38.                 Print "See you later!"
  39.                 Sleep(1000)
  40.         End If
  41. End Sub
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: September 09, 2006, 06:28:32 AM by Gerome »