2015-06-20 25 views
2

我正在運行Windows 7 64位(庫文件夾已移至E:,系統仍在C:)。我正在使用someone's batch file在我的第二個顯示器(左)和我的主顯示器(右)上以全屏方式打開VLC媒體播放器。批處理文件位於我的視頻庫中,並將視頻文件拖放到批處理文件中,除非關閉VLC,否則命令提示符將不會關閉。命令提示符在拖放到批處理文件後保持打開狀態

我試過exitcls,goto:eof@echo off開始時有幾種不同的組合,但沒有成功。如何在打開VLC後關閉cmd窗口或從不顯示?

(請注意,我的cmd窗口占用了,因爲我是如何用它來完全無關的東西,所以沒有使它更小,移動它不會工作大部分我的主屏幕。)

set vlcPath="C:\Program Files\VideoLAN\VLC\vlc.exe" 

%vlcPath% %1 --video-x=-1920 --video-y=1080 --width=300 --height=300 --fullscreen --no-video-title-show --no-embedded-video --no-qt-fs-controller 
+0

你可以ST藝術它從一個VBScript如果你喜歡,而隱藏控制檯! – Hackoo

+0

你能指定或提供詳細信息嗎? – Listatta

+0

你用命令啓動了嗎? 檢查我的答案! – Hackoo

回答

1

試試這個批次:

@echo off 
set vlcPath="C:\Program Files\VideoLAN\VLC\vlc.exe" 
start "" %vlcPath% %1 --video-x=-1920 --video-y=1080 --width=300 --height=300 --fullscreen --no-video-title-show --no-embedded-video --no-qt-fs-controller 
Exit 

這我的意思用VBScript來做到這一點:

Option Explicit 
Dim vlcPath,video,Command,ws 
If WScript.Arguments.Count > 0 Then 
    video = WScript.Arguments.Item(0) 
    vlcPath ="C:\Program Files\VideoLAN\VLC\vlc.exe" 
    Command = DblQuote(vlcPath) & " " & DblQuote(video) &" --video-x=-1920 --video-y=1080 --width=300 --height=300 --fullscreen --no-video-title-show --no-embedded-video --no-qt-fs-controller""" 
    'wscript.echo Command 
    set ws = CreateObject("wscript.shell") 
    ws.run Command,1,True 
else 
    wscript.echo "You must drag and drop any video over this script in order to open it in fullscreen" 
end if 
'********************************************************************************* 
Function DblQuote(Str) 
    DblQuote = Chr(34) & Str & Chr(34) 
End Function 
'********************************************************************************* 
+1

ahh偉大的工作就像一個魅力! – Listatta

+0

不錯,所以在這種情況下,你似乎是一個新用戶,如果你得到一個可以幫助你的答案,請記住將它標記爲已接受! 看到這個==> http://stackoverflow.com/tour – Hackoo

+0

你也可以嘗試一個VBScript也檢查我最後的編輯!並且不要忘記接受它作爲答案! – Hackoo

相關問題