Just an idea. You could also modify the youtube_search.lua script so that it only performs the YouTube search, but when a link is clicked, it passes it on to VLC, which then plays the YouTube link using the perfectly functioning youtube.lua script. That would streamline the script and make use of existing code. In such a case, there would be no need to reinvent the wheel. But as initially said, it's just an alternative approach. An AIO solution is of course fine, too. And optimisation is great, but first comes fixing as your script doesn't work at all under Windows XP.