After a lot of hours of Google search I think that really need your help, because I just learn Batch. I make commands for a .bat file similar .cmd, an improved personal assistent with simplier command of human language and one of his functions would be a websearch on Wikipedia. But now... I've problem to make something like this:
Code:
:what is 'empty area to fill here'
start chrome.exe http://en.wikipedia.org/wiki/'filled area here'
goto start
E.g.: ':what is 'Adam'' would be a command writting into command line of my open source program because of cmd.exe will open chrome.exe on url: http://en.wikipedia.org/wiki/Adam
Thanks for any usable advise
Batch file to search wikipedia
Moderator: DosItHelp
Re: Pls, help me to create one Batch command
try this:
Code: Select all
@echo off
setlocal enabledelayedexpansion
:in
set "area="
set /P "area=search:"
if not defined area goto :in
start chrome.exe http://en.wikipedia.org/wiki/!area!
goto in
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Pls, help me to create one Batch command
Code: Select all
@echo off
cls
set /p "subject=Enter your subject: "
start chrome.exe http://en.wikipedia.org/wiki/"%subject%"
Re: Pls, help me to create one Batch command
This presents a search term to the wikipedia search engine:
Code: Select all
@echo off
cls
:loop
set "subject="
set /p "subject=Enter your subject: "
if not defined subject goto :EOF
set "subject=%subject: =+%"
start "" chrome.exe "http://en.wikipedia.org/w/index.php?search=%subject%"
goto :loop