PDA

View Full Version : Programming assistance...



Cortexian
May 2nd, 2008, 02:26 PM
OK, I'm trying to make a neat little intro for a program I made at school, I was going to do one of those ASCII introductions through a bat file, however, the ASCII 'logo' that I have isn't valid because it uses slashes and such... I'm just wondering if there is any way to get the bat file to ignore them? and just display them? Here is my code for reference:




@echo off
:: PLEASE DO NOT EDIT ANYTHING IN THIS FILE!
COLOR 02
echo !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~!
echo ! _____ _ !
echo ! | ___| __ ___ ___| | __ _ _ __ ___ ___ _ __ TM !
echo ! | |_ | '__/ _ \/ _ \ |/ _` | '_ \ / __/ _ \ '__| !
echo ! | _|| | | __/ __/ | (_| | | | | (_| __/ | !
echo ! |_| |_| \___|\___|_|\__,_|_| |_|\___\___|_| !
echo ! !
echo ! -----------------------------{ WELCOME }-------------------------------- !

It then continues on with the coding. Unfortunately it won't actually run though, because of the slashes in the name. Is there any way for me to 'void' them, and just have them display?

Thanks for the help!

Omega
May 2nd, 2008, 02:49 PM
It's because the ASCII thingy includes the pipe symbol |. It it used to redirect the output of one program to the input of another program. Anyway, you need to 'escape' the pipe symbol with a ^. So you'll end up with something like this:



echo ! ^| ___^| __ ___ ___^| ^| __ _ _ __ ___ ___ _ __ TM !
echo ! ^| ^|_ ^| '__/ _ \/ _ \ ^|/ _` ^| '_ \ / __/ _ \ '__^| !
And just to be complete, here is some info about the pipe |. Might be usefull.
http://www.pcmag.com/encyclopedia_term/0,2542,t=DOS+filters++pipes&i=41805,00.asp
http://www.atarimagazines.com/compute/issue129/80_Plumbing_the_depths_.php

Cortexian
May 2nd, 2008, 02:53 PM
Ah OK, I figured it was something like that... For instance, in HTML, you need to do two '//' to void it.

Thanks!