VLC to front when already open

When opening a video using VLC, and VLC is already open, it doesn't come to front again.

I know it's not DO-related, but maybe another user could solve this problem or there's a command/script that can bring VLC to front.

Probably AutoHotkey could do it.

Try http://www.nirsoft.net/utils/nircmd.html

And then use it like this:
nircmd win activate title "VLC Media Player"
to bring VLC window to front.

You can use this jscript code (no need for external utilities):

var wshShell = new ActiveXObject("WScript.Shell");
wshShell.AppActivate("VLC media player");

You can put it in a button (in OnClick function), but you could also put it in Settings > File Types... > File Type Groups (Movies) > Left double-click > (jscript) or you could make a new Context menu "Open with VLC"...

In any case, you should add code which opens selected file(s) in VLC and then executes these two lines of code afterwards to bring the VLC on top.

Also, VLC prepends the current file name in its title like: "filename.avi - VLC media player" so this code will fail on VLC window which plays a video unless you add the filename prefix programmatically (but you'd have to do this with suggestions above too). Tell us if you need more detailed assistance about this (I'm currently at work so I can't make a complete solution just yet, but I think it's pretty easy and not a lot of code is needed when Opus-scripting approach is used).

Thanks to all answers.

I searched for a (portable) alternative player since WMP doesn't support DVD anymore (and sometimes I need it), so I gave VLC again a try after years.

But I've read that "window to front" is a known problem of VLC over years and also VLC opens noticable slower when using a skin. So I don't want support VLC and use MPC now.

In case using NirCmd - you can replace "title" with "ititle" to find partially window title.

http://nircmd.nirsoft.net/win.html

So my command will looks like this:
nircmd win activate ititle "VLC Media Player"

Personally I think that VLC is not so good media player, full of bugs and problems. I recommend PotPlayer or even properly configured GOM Player - much better alternatives both.

GOM is also nice, actually testing out how stable MPC is.

MPC is stable, but GOM and Pot and many others are stable too. I don't think that you can easily find unstable player, unless it's really bad or some less kown beta project. Question is do you want to something highly configured (PotPlayer is similar to Opus in this case) or just easy to use "out of the box". And, of course, does he have everything inside (including all major codecs) or is system-dependent. MPC, like VNC, is not my first choice. What is interesting that both - PotPlayer and GOM have possibility to make your own keyboard shortcuts, so you can configure them like your other favorite player.

Advantage of MPC is, that it is fully portable (writing its settings to progdir), but uses an old style gui. MPC-BC for example has got nicer gui, but crashes sometimes. I tried Gom when it was new, but will try these days again.

I really loved the combination of K-Lite Basic with WMP, it simply worked over xx years with every video-type til Win 8.