2016-09-06 109 views
0

我需要一個批處理文件,可以打開導航器start "" www.google.com 並在「搜索」框上寫一些文本。 例如我想打開一個.bat文件,打開谷歌瀏覽器後,輸入一些文字進行研究批處理文件打開導航器和寫在窗口

我該怎麼辦?

+0

http://www.google.com.au?q=rtfm – 2016-09-06 11:34:55

回答

1

目錄更改爲的chrome.exe位於(cd)並運行:

chrome.exe --new-window google.com?q="How to run chrome from command line" 
0

你可以嘗試這樣的事情,如果你想在新標籤頁或新窗口中打開:

@ECHO OFF 
Set "KeyWord=Batch file to open navigator AND WRITE on the window" 
Set "NewWindow=--new-window" 
Set "NewTab=--new-tab" 
echo Starting new search in new tab : 
Start "" chrome.exe %NewTab% https://www.google.com?q="%KeyWord%" 
cls 
echo Hit any key to open the new search in new window 
pause>nul 
Start "" chrome.exe %NewWindow% https://www.google.com?q="%KeyWord%" 
cls 
echo Type some keyword to be searched by google ! 
Set /P "InputKeyWord=" 
Start "" chrome.exe %NewWindow% https://www.google.com?q="%InputKeyWord%" 
exit 
相關問題