Unusual use - keyIsPressed function

Discuss your Lua playlist, album art and interface scripts.
jez4
New Cone
New Cone
Posts: 2
Joined: 07 Aug 2012 19:30

Unusual use - keyIsPressed function

Postby jez4 » 07 Aug 2012 19:46

Hey guys,
i want to use vlc for very weird purpose - when some key is pressed, it should keep on playing (advancing in playlist), but when the key is not pressed, it should wait to finish playing current playlist item and then end in static image (could be last frame of the videos). When we press the key again, it continues playback from next track.

I was thinking of something like that:

Code: Select all

function OnMovieFinish { if KeyIsDown (MOUSE_2) { playNext else stop } } function OnMouseDown { playRandom }
I have never worked with LUA though, so I am not sure, if this is even possible. Could you guide me in another direction how to simply get this working?

Or couldnt it be solved much easier through hotkeys? But I do not know how to capture this IsStillPressed feature...

Any help is much appreciated.

Thanks
J/

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: Unusual use - keyIsPressed function

Postby Jean-Baptiste Kempf » 07 Aug 2012 22:34

"mouse-pressed" action might be callback-able.
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.

jez4
New Cone
New Cone
Posts: 2
Joined: 07 Aug 2012 19:30

Re: Unusual use - keyIsPressed function

Postby jez4 » 09 Aug 2012 09:02

I quite do not understand you. After some search I concluded this as too complex. Instead i am trying to exploit vlc for dot net, where there is easy to add complex logic.

thx anyway.
J/


Return to “Scripting VLC in lua”

Who is online

Users browsing this forum: No registered users and 18 guests