我会告诉你我已再试图解释的问题,批处理,我可以从批处理脚本中打开url吗?
@echo off
Echo put search in front of a question to search for the answer on the internet
Set /p question=
就是这样,到目前为止,如果用户将它在网上搜索问题的搜索我的面前,我想它,所以它也在一个批处理文件中。由于
我会告诉你我已再试图解释的问题,批处理,我可以从批处理脚本中打开url吗?
@echo off
Echo put search in front of a question to search for the answer on the internet
Set /p question=
就是这样,到目前为止,如果用户将它在网上搜索问题的搜索我的面前,我想它,所以它也在一个批处理文件中。由于
试试这个
cd C:\Program Files\Internet Explorer
iexplore http://www.google.pt/search?q=%search%+site:https://stackoverflow.com/
或简单
START "" "http://www.google.com/search?q=%*"
帮助全环节
Start a program, command or batch script (opens in a new window.)
如果你只是想打开默认的Web浏览器,这是因为使用start
一样简单。
这段代码将检查您的问题变量是否包含“search:”,方法是替换“search:”并与原始值进行比较。如果它们匹配,则不会输入搜索。
@setlocal enableextensions enabledelayedexpansion
set /p question=
set questionWOspaces=%question: =+%
IF NOT "%question:search:=%"=="%question%" (START http://www.google.com/search?q="%questionWOspaces:search:=%")
可能重复[如何使用批处理脚本和关键字搜索Internet?](http://stackoverflow.com/questions/30135897/how-do-you-search-the-internet-与-A-批处理脚本和一个关键字) – rojo