EDIT: wow I freaking figured it out minutes after posting when trying to save another lua file into the same folder. Running VLC as an administrator fixed the problem... I guess I could save the txt file somewhere in my documents folder since it will have to read/write every time a file is played.
I'm trying something similar, however
io.output is throwing me an error.
Code: Select all
extfile = io.open(vlc.config.datadir().."\\lua\\extensions\\basic_history.txt", "r")
if extfile == nil
then
extfile = io.output (vlc.config.datadir().."\\lua\\extensions\\basic_history.txt")
extfile = io.open(vlc.config.datadir().."\\lua\\extensions\\basic_history.txt", "r")
end
Specifically, VLC messages is throwing this error
Code: Select all
lua warning: Error while running script C:\Program Files\VideoLAN\VLC\lua\extensions\basic_history.lua,
function activate(): ... Files\VideoLAN\VLC\lua\extensions\basic_history.lua:29: bad argument #1 to 'output' (C:\Program Files\VideoLAN\VLC\lua\extensions\basic_history.txt: Permission denied)
lua error: Could not activate extension!
I'd like to just create a text file, and every time VLC opens a new file it appends the file name to the text file. Essentially creating a history.