Ascii Text Art That Works in a Batch File
You'll need to run it from the command line to keep the window from closing. If you just run the batch file it will stop and shut the window because information technology doesn't think you need the command window open up anymore.
However, with the "pause" in there at the end information technology should wait for input before closing the window. Try running it from within a command prompt and run into what you get.
thumb_up thumb_down
So I should get-go from CMD then yes
thumb_up thumb_down
It ends maxim the syntax is incorrect.
thumb_up thumb_down
Correct.
So open up cmd, "cd" to the directory that the batch file is stored in, and run the file from in that location.
thumb_up thumb_down
yes, it does thank you, i need a way to fix that though
It ends saying the syntax is incorrect.
thumb_up thumb_down
Something is wrong with the echo commands
thumb_up thumb_down
That is what I did. It ends incorrectly. The issue is with the echo commands because I took them out and it ran.
thumb_up thumb_down
Your pseudo ASCII art is using special characters. Put your art in its ain .txt file (like hallway.txt) and insert the type command where you want your ASCII characters to get:
There are other methods as well... read this:
http://stackoverflow.com/questions/19642622/how-do-i-repeat-ascii-fine art-that-contains-special-characters...
thumb_up thumb_down
You need a space after Echo for the text to actually display. It thinks that "Repeat|" is a command that it can't observe. Use "ECHO |" instead.
thumb_up thumb_down
Issue is with the upright grapheme at the beginning of the repeat lines.
thumb_up thumb_down
Go with Will4291's suggestion.
@echo off
Title VD7's fun maze
colour 0a
:start1
cls
:startreal
echo You are at the end of a hallway, in the room you tin can run across a door to ane side of yous, and a
pocket-size loo to your left
echo ----------------
echo - O -
repeat - -
echo - : \
echo - /
repeat - -
echo - -
echo ------------------
:Firstq
echo would you like to wait into the toilet or endeavour to go out the room?(1 or 2)
gear up input
set up /p input = Selection:
if %input%==i goto toilet if Non goto Firstq
if %input%==two goto roomtwo if Not goto Firstq
pause
thumb_up thumb_down
UPDATE: It is at present openable but whenever opened it shows this
thumb_up thumb_down
At present that you accept it working, try running it only by double clicking it and see if the "PAUSE" command does its job to hold the window open up waiting for input. That should remove the file path from what it's printing to the screen.
thumb_up thumb_down
UPDATE: I have gotten everything to work but now we can segue into this pocket-sized problem, at my kickoff question it always gives an fault bulletin and closes, does anyone easily see the trouble?
Batchfile
@ echo off Championship VD7's fun maze color 0a : start1 cls : startreal echo You are at the end of a hallway, in the room you echo tin see a door to one side of you, echo and a small loo to your left repeat ################## echo # )O # echo # # echo # :) \ repeat # / echo # # echo # # repeat ################## : Firstq echo would yous similar to wait into the toilet or endeavor to leave the room?(1 or 2) set /p option = Choice: if %pick% ==1 goto toilet if %selection% ==2 goto roomtwo : toilet repeat you lot sicko, why would you await inside the toilet... echo Well is was worth it i gauge, you constitute a small chocolate bar echo DON'T Consume Information technology, WHAT'Southward WRONG WITH YOU echo Wow, you truly are a nasty person repeat Back to the game, standing in the room goto Firstq TIMEOUT /t x : roomtwo echo expert choice, improve than searching a toilet TIMEOUT /t 10
thumb_up thumb_down
Source: https://community.spiceworks.com/topic/628389-working-on-batch-files-beginner-small-error
0 Response to "Ascii Text Art That Works in a Batch File"
Enregistrer un commentaire