Created
November 13, 2013 13:22
-
-
Save hmasato/7449004 to your computer and use it in GitHub Desktop.
[Maya, Mel, Win] _playVLC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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