Skip to content

Instantly share code, notes, and snippets.

@hmasato
Last active December 16, 2015 18:39
Show Gist options
  • Save hmasato/5479477 to your computer and use it in GitHub Desktop.
Save hmasato/5479477 to your computer and use it in GitHub Desktop.
[WScript, QuickTime, Win, jscript] _playQT_min.cmd
@if(0)==(0) echo off
cscript.exe //NoLogo //E:JScript "%~f0" %*
goto :eof
@end
f1:
// command <movie file> [<frame>]
var ws = WScript;
if(ws.Arguments.Count()<1) ws.Quit();
var fn = ws.Arguments.Item(0);
var qt = ws.CreateObject("QuickTimePlayerLib.QuickTimePlayerApp");
ws.Sleep(800);
if(qt == null) ws.Quit();
var qtp = qt.Players.Item(1);
qtp.OpenURL(fn);
var mov = qtp.QTControl.Movie;
if(ws.Arguments.Count() == 2) mov.Time = ws.Arguments.Item(1);
mov.Loop=1;
mov.Play();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment