Lua script for deleting file on Mac OS X

Discuss your Lua playlist, album art and interface scripts.
Kuzu
New Cone
New Cone
Posts: 9
Joined: 22 Jul 2015 10:54

Lua script for deleting file on Mac OS X

Postby Kuzu » 22 Jul 2015 12:53

I'm using this script but it won't delete when I select a file in the playlist/queue and hold Ctrl + Alt + D

https://gist.github.com/ifischer/686890164cadacdf6726

I put it inside VLC's package content inside the extensions folder as it says but it doesn't work. The file is a .txt file rather than .lua. I tried renaming it but it didn't work either.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Lua script for deleting file on Mac OS X

Postby mederi » 23 Jul 2015 11:48

Hotkeys in Lua scripts (.lua not .lua.txt) are not supported since VLC-2.1. You can edit the provided script to replace

Code: Select all

function activate() vlc.var.add_callback( vlc.object.libvlc(), "key-pressed", key_press ) end
with

Code: Select all

function activate() delete() end
Now if you want to delete a file, you need to click in VLC menu.
Then you could have a simple dialog box, a control panel with two buttons [ Delete ] and [ Play next ] for easier process of clearing your list of files. Just check similar scripts lying around here.

147852369
Blank Cone
Blank Cone
Posts: 55
Joined: 01 Mar 2013 12:18

Re: Lua script for deleting file on Mac OS X

Postby 147852369 » 05 Jan 2017 23:07

Hello!
I have good news. Here's a new topic about this problem: https://forum.videolan.org/viewtopic.ph ... 68#p451830

I started to develop a VLC Media Player based on JavaFX. You can delete files directly from hard drive also on Windows - without crashing! Please test and notify me about your experience in the new thread.


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 11 guests