Getting the clicked word from the subtitle

Discuss your Lua playlist, album art and interface scripts.
napstrike
New Cone
New Cone
Posts: 1
Joined: 14 Jan 2018 11:49

Getting the clicked word from the subtitle

Postby napstrike » 14 Jan 2018 12:04

Hi there.
Is it possible for a script to detect the exact word of a subtitle we clicked on?
For example, I paused the video at 10:23, and the subtitles read as "He tucked the body inside his truck". Let's assume I don't know the meaning of the word "tucked". I want to be able to just click on the word "tucked", and the script copies that word to the clipboard.
I can then search it manually if integrating a dictionary to VLC is too much of a hassle.

I was thinking about reading the subtitle file and getting the sentence at the said time (also taking subtitle time corrections into account). I think that would be possible. After that, the script can open a GUI and we can click on the exact word we wanna copy from there. This is my plan B; if directly clicking on the word isn't possible.
Unfortunately, I am very new to VLC scripting, but know some LUA scripting from my experience with Garry's Mod and Computercraft. So if any of you think that you can do this easily, go for it. I will be very grateful.

Such a script would be amazing for people that are trying to learn English (or any other language).

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Getting the clicked word from the subtitle

Postby Jean-Baptiste Kempf » 14 Jan 2018 22:22

So far, this is not possible, I'm afraid.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

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: Getting the clicked word from the subtitle

Postby mederi » 15 Jan 2018 13:58



Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 12 guests