Skip to content

Instantly share code, notes, and snippets.

@hmasato
Created November 13, 2013 13:22
Show Gist options
  • Select an option

  • Save hmasato/7449004 to your computer and use it in GitHub Desktop.

Select an option

Save hmasato/7449004 to your computer and use it in GitHub Desktop.
[Maya, Mel, Win] _playVLC
proc _playVLC(string $files[])
{
if(size($files)<1) return;
string $app="C:/PathToVLC/vlc.exe";
if(!`filetest -x $app`) return;
string $opt = " --one-instance -R";
string $cmd="";
for($f in $files){
if($f=="") continue;
if(!`filetest -r $f`) continue;
if(!`filetest -f $f`) continue;
$f = substituteAllString($f, "\\", "/");
$cmd += " \""+encodeString($f)+"\"";
}
if($cmd=="") return;
$cmd="shell "+$app+$opt+$cmd;
system($cmd);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment