Last active
December 16, 2015 18:39
-
-
Save hmasato/5479477 to your computer and use it in GitHub Desktop.
[WScript, QuickTime, Win, jscript] _playQT_min.cmd
This file contains 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
@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