I’m trying to make a Windows batch script, but the problem is that when the Google terminal loads, the Command Prompt window closes.
Here’s the code:
@echo off
setlocal enabledelayedexpansion EnableExtensions
mode con cols=80 lines=25
title Windows Batch Edition
REM Some code removed from here.
timeout /t 2 /nobreak >nul
goto googleterminalhome
:googleterminalhome
echo.
echo.
echo welcome back anonymous. today is %date%!
echo
echo .g8"""bgd `7MM
echo .dP´ `M MM
echo dm´ ` ,pW"Wq. ,pW"Wq. .P"Ybmmm MM .gP"Ya
echo MM 6W´ `Wb 6W´ `WB :MI I8 MM ,M´ Yb
echo MM. `7MMF´8M MB 8M M8 WmmmP" MM 8M""""""
echo `Mb MM YA. ,A9 YA. ,A9 8M MM YM. ,
echo `"bmmmdPY `Ybmd9´ `Ybmd9´ YMMMMMb .JMML.`Mbmmd´
echo 6´ dP
echo NET SEARCH ENGINE Ybmmmd´
echo.
echo.
echo today's news | AL GORE INVENTS THE INTERNET
echo.
echo 'Google (S)earch' or 'I'm feeling (L)ucky'? choose (S/L)
set /p string=
if %string% == S goto searchstring
if %string% == L goto luckystring
:searchstring
echo what's your search string?
set /p searchstring=
if %searchstring% == 1 goto appleii
:appleii
echo searching for: Apple II...
timeout /t 3 /nobreak >nul
echo [SEARCH RESULTS][HOME OPTION CODE >0<]
echo +---------------------------------+ +---------------------------------+
echo |APPLE II SERIES - WIKIPEDIA, | |host en.wikipedia.org |
echo |THE FREE ENCYCLOPEDIA | |http://en.wikipedia.org/wiki... |
echo |The Apple II series | |OPTION CODE NUMBER >1< |
echo |(trademarked with square bra... | | |
echo +---------------------------------+ +---------------------------------+
set /p optioncode=
if %optioncode% == 0 goto googleterminalhome
:shutdown
cls
echo shutting down...
timeout /t 3 /nobreak >nul
exit
REM Some code removed from here.
New contributor
Jmr423 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
8