Minggu, 31 Oktober 2010

batch program

coding coding..

code:

start script
@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
————————————-end of script————————————
Copy paste script diatas ,truz save dgn extensi *.bat
Masih bingung cara makenya?jelas aja kan belum dijelasain…piye to mas sampeyan iki…:
Berikut penjelasannya :

1. Tampilan awal :

Wow..keren juga….:p
Pada tahap ini untuk memilih search engine:
Tekan -1 untuk paman gugel
2 untuk om yahoo
3 untuk m’pok em-es-en
Truz tekan enter..
Lalu, jreng tiba2muncul penampakan pesan seperti gambar dibawah…

2. Masukkan Keyword/Syntax

Di tahap ke-2 ini tinggal ketik aja kata2 yang sering kamu cari di gugel.
Syntax : Keyword [parameter]

Tidak ada komentar:

Posting Komentar