Karena masih coba-coba apa aja jadi ada.... juga jarang ada berita, semua lama.....

Mesin cari Google, Yahoo, dan MSN dalam batch file

Tidak ada komentar
Biasanya kalo mau cari sesuatu musti masuk ke firefox / internet explorer
baru masuk ke Google atau Yahoo, tapi kali ini di buat dalam dos prompt
tinggal kopas ke notepad :

@echo off
TITLE Internet Search
mode 27,10
:start
(set i=)
(set g=)
(set y=)
(set m=)
cls
echo --------------------------
echo [ Available SearchEngine ]
echo --------------------------
echo [ 1. Google ]
echo [ 2. Yahoo ]
echo [ 3. MSN ]
set /p i=Choose SearchEngine:
if not defined i goto start
if "%i%"=="1" goto google
if "%i%"=="2" goto yahoo
if "%i%"=="3" goto msn
goto start

:google
set /p g=Google Search:
if not defined g goto start
set g=%g: =+%
set g=%g:+/= %
call :gsearch %g%
goto start
:gsearch
if /i "%2"=="" start http://www.google.com/search?q=%1
if /i "%2"=="w" start http://www.google.com/search?q=%1
if /i "%2"=="i" start http://images.google.com/images?q=%1
if /i "%2"=="v" start http://video.google.com/videosearch?q=%1
goto :eof

:yahoo
set /p y=Yahoo Search:
if not defined y goto start
set y=%y: =+%
set y=%y:+/= %
call :ysearch %g%
goto start
:ysearch
if /i "%2"=="" start http://search.yahoo.com/search?p=%1
if /i "%2"=="w" start http://search.yahoo.com/search?p=%1
if /i "%2"=="i" start http://images.search.yahoo.com/search/images?p=%1
if /i "%2"=="v" start http://video.search.yahoo.com/search/video?p=%1
goto :eof

:msn
set /p m=MSN Search:
if not defined m goto start
set m=%m: =+%
set m=%m:+/= %
call :msearch %g%
goto start
:msearch
if /i "%2"=="" start http://search.msn.com/results.aspx?q=%1
if /i "%2"=="w" start http://search.msn.com/results.aspx?q=%1
if /i "%2"=="i" start http://search.msn.com/images/results.aspx?q=%1
if /i "%2"=="v" start http://search.msn.com/results.aspx?q=%1+mpeg
goto :eof


Tidak ada komentar :

Posting Komentar