Page 1 of 1

Special characters in batch files?

Posted: 14 Nov 2011 14:36
by Cat
This is a picture of a batch game I'm making.

http://i44.tinypic.com/qpfdpd.png

I use ± for the blocks, but how do i get rid of the underscores, and put a blank space instead? Alt + 0160 doesn't work, and neither does Alt + 255. How do i place an empty, blank space when a variable is echoed without the variable being nul?

Re: Special characters in batch files?

Posted: 15 Nov 2011 04:23
by Ed Dyreen
'
What is the problem, cant you just echo a space ( not a special char ) ?

Re: Special characters in batch files?

Posted: 15 Nov 2011 14:36
by Cat
Using "ECHO " will result as "ECHO is on." Also, you can't set a variable to a space.

Re: Special characters in batch files?

Posted: 15 Nov 2011 14:43
by Ed Dyreen
'
thanks, I didn't realize that :roll:

Code: Select all

@echo off
set "$space= "
echo.%$space%
echo. %= space =%
for /l ( 1, 1, 1000 ) do <nul set /p "= I H A V E A L O T O F S P A C E "
pause

Re: Special characters in batch files?

Posted: 15 Nov 2011 16:28
by colargol

Code: Select all

echo( 
(with a space after parenthesis)
should work, no?