View Single Post
09-15-09, 11:33 AM   #3
xConStruct
A Chromatic Dragonspawn
 
xConStruct's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 199
WoW doesn't provide any file operations, because it would make communication with the outside world too easy (getting access to Internet databases via text files and program, botting information, etc).

You would need a normal .lua-file as part of your addon to store your playlist in.

Code:
MusicPlayer.data = {
    "Bossa ouch.mp3",
    "2-Walkie Talkie.mp3",
}
Importing your Windows Media Player list would be only possible by storing it in a variable, too, e.g.:
Code:
MusicPlayer.data = [[
<?wpl version="1.0"?>
<smil>
     <!-- and on goes your file -->
</smil>
]]
But you would have to write the parser for the file by yourself. Well, maybe there are XML parsers for Lua around on the Internet ...
Basically all is possible as long it is in a Lua-file, defined in a .toc and saved in a variable. But no file operations.

EDIT: You could also write a (Lua-) script which works outside of WoW, scans the directory and just generates the necessary files before starting WoW - if you installed a script language on your system.
__________________
« Website | GitHub »

Oh hai!

Last edited by xConStruct : 09-15-09 at 11:36 AM.
  Reply With Quote