Last active
December 17, 2015 09:49
-
-
Save hmasato/5590049 to your computer and use it in GitHub Desktop.
[WScript, QuickTime, Win, jscript] _openFoldersFromCurrentQT.cmd
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
| @if(0)==(0) echo off | |
| cscript.exe //NoLogo //E:JScript "%~f0" %* | |
| goto :eof | |
| @end | |
| f1: | |
| var ws = WScript; | |
| var wsh = new ActiveXObject("WScript.Shell"); | |
| var wmi = GetObject("winmgmts:\\\\.\\root\\cimv2"); | |
| var qtpr = wmi.ExecQuery("Select * from Win32_Process where name='QuickTimePlayer.exe'"); | |
| if(qtpr.Count < 1) ws.Quit(); | |
| var qt = ws.CreateObject("QuickTimePlayerLib.QuickTimePlayerApp"); | |
| if(qt == null) ws.Quit(); | |
| for(var i=0; i < qt.Players.Count; i++){ | |
| var fn = qt.Players.Item(i+1).QTControl.Movie.URL; | |
| wsh.Run("explorer.exe /select,\""+fn+"\""); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment