1

So, I made a huge piece of ASCII Art which I wanted displayed when you open a .bat file in command prompt. Only thing is when I save it as the batch file, and open it in command prompt, it displays the SYMBOLS but it's seriously buggy. It's generally an incomprehensible mush of characters. It also appears to stretch it ridiculously and display the right side on the left side and vice versa, as well as overlapping them.

Does anyone know how to solve this?

The characters I've been using are: # . @ + ( ) { } + ' \ / ? X g z

Also I've been doing it in the format of:

@echo off
color 40
echo "#########"
echo "#.......#"
echo "#../@\..#"
echo "#.......#"
echo "#########"
set /p enter=
if %enter% = C exit

This isn't the ACTUAL piece of artwork, but just to give you an idea of what it's like. I wasn't about to paste the whole thing because it's 187 char wide by 74 lines tall. (Maybe the sheer size is something to do with it...? But I don't see why it should be!)

Also, I've tried the echo command both WITH " " around the ASCII and without. (so echo ##### and echo "#####")

Anyway. I hope I've given you enough information!

Makoto
  • 104,088
  • 27
  • 192
  • 230
  • Could you provide a screenshot? – tckmn Feb 12 '13 at 22:07
  • Of the bugs or the original txt image? I'll do both just in case. – NyanCatNatz666 Feb 12 '13 at 22:09
  • Of the bugs (the text in the command prompt) – tckmn Feb 12 '13 at 22:12
  • 1
    Right, here are the images: Original image: http://i162.photobucket.com/albums/t254/littlenatnatz/txtimage_zps7798be7b.jpg Bugged: http://i162.photobucket.com/albums/t254/littlenatnatz/txtimage_zps7798be7b.jpg (Note: the bugged window is only covering half the desktop, and that's apparently it's "full screen" - it won't open further along than that. I don't know if that's significant at all or not...) (The bugged version image quality is really bad for some reason, I'm hoping that is't a problem. But for the record, those black blobs are #'s - this is also a very small part of it) – NyanCatNatz666 Feb 12 '13 at 22:19
  • um those are both the same images? – tckmn Feb 12 '13 at 22:21
  • ...thats weird. let me try that again. original: http://i162.photobucket.com/albums/t254/littlenatnatz/txtimage_zps7798be7b.jpg bugged: http://i162.photobucket.com/albums/t254/littlenatnatz/txtimagefail_zpsc473a1c5.jpg (yeah that works for me now too) – NyanCatNatz666 Feb 12 '13 at 22:22
  • the image is too low quality for me to see. Upload it on http://imgur.com – tckmn Feb 12 '13 at 22:25
  • Hey Doorknob, Ken White just answered the question and it worked! Thank you for the help though! ^^ – NyanCatNatz666 Feb 12 '13 at 22:34
  • Put "pause" (no quotations) at the very bottom of the code and no matter what, it will wait for you to press a key on the keyboard before it exits out. This little cheat of the sytsem works wonders for me. –  May 06 '13 at 16:40

1 Answers1

0

187 characters exceeds most normal command window widths, so your lines are probably wrapping (too long on the right, so they wrap to the next line).

Check your command window properties to see what the window width and height are (on the Layout tab); those are the numbers of characters and lines you have before you get wrapping or scrolling.

enter image description here

Ken White
  • 123,280
  • 14
  • 225
  • 444
  • There's a way to call a powershell command from a batch script to resize the console window while keeping the scroll bar. If no one has provided details before I get to a computer, I'll explain further. – rojo Feb 12 '13 at 22:33
  • @rojo: Where do you see anything about PowerShell here? This is about plain old batch programming in a .bat file. – Ken White Feb 12 '13 at 22:35
  • @kenwhite - huge ASCII art, small window, it's a logical progression. [This](http://stackoverflow.com/questions/13311924/cmd-set-buffer-height-independently-of-window-height) is what I had in mind. – rojo Feb 12 '13 at 22:39
  • Ascii art can be shown in the MS-DOS window with a size of up to 341x139 (that is in my computer, the maximum size depends on your video hardware); the way to do that is seting the MS-DOS shortcut properties with the minimum size font (Lucida Console @ 5) and maximum number of columns and lines that does not cause scrolling. In [this topic](http://www.dostips.com/forum/viewtopic.php?f=3&t=4125) is explained the way to also show Ascii Art **in COLOR**! – Aacini Feb 13 '13 at 00:45
  • @Aacini: Changing the command window properties (there is no "MS-DOS" window) is exactly what I mentioned (and what my image demonstrates). – Ken White Feb 13 '13 at 00:48
  • @KenWhite: Your advice was to not exceed current window widths, reported via Command Prompt properties, Layout tab: "those are the numbers of characters and lines you have before you get wrapping or scrolling" (80x25 in your example). My suggestion was to _increase_ such limits by setting the font size to minimum. In my Windows-XP computer the title of the "command window" is precisely "MS-DOS". Did you see the title of the window at the link I posted? "MS-DOS - ShowColorAsciiArt.bat Mona-Lisa.caa" – Aacini Feb 13 '13 at 02:22
  • @Aacini: No, my answer was "You're limited by the number of lines and characters. You can change them here", and I showed the dialog where to do so. As far as the name for the command window, Windows XP is outdated by three versions (Vista, Win7, Win8), and there's no indication in the question that the answer was needed for XP. :-) Reducing the font size doesn't increase the number of characters per line. It makes that limited number of characters appear using fewer pixels in width. – Ken White Feb 13 '13 at 02:28
  • @KenWhite: I copy-pasted your answer and here it is: "187 characters exceeds most normal command window widths, so your lines are probably wrapping (too long on the right, so they wrap to the next line). Check your command window properties to see what the window width and height are (on the Layout tab); those are the numbers of characters and lines you have before you get wrapping or scrolling". You did NOT even mentioned "Change"! ??? About increasing the number of characters per line, I suggest you to see it with your own eyes: http://www.dostips.com/forum/viewtopic.php?f=3&t=4125 – Aacini Feb 13 '13 at 02:47