2123Views16Replies

Author Options:

is it possible to make a .bat file so when you open it it displays a message like hello? Answered

please help i want it so when you open the file it says hello in the middle of the screen but i also want to know how to get the writing off aswell

16 Replies

user
Prof. Pickle (author)2012-08-09

Try:

@echo off
echo hello

OR:

@echo off
msg * Hello


Select as Best AnswerUndo Best Answer

user

Oooops, I forgot the pause > nul at the end:

@echo off
echo Hello
pause > nul

Select as Best AnswerUndo Best Answer

user
dhynds100 (author)2009-08-05

All codeing based on a a 1280 by 1024 res have Fun. For the center of the screen in the cmd main window use this. script below Save a .bat @echo off color 0a echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo Hello echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. pause>null For the cent of fullscreen use this script below @echo off color 0a echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo Hello echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. pause>null and for some fun i put this together. @echo off color 0a sleep 3 echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo Hello echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. sleep 1 color 0b @echo off color 0a echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo Welcome echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. sleep 1 color 0c @echo off color 0a echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo Merkava out echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. echo. pause exit

Select as Best AnswerUndo Best Answer

user
XOIIO (author)2009-05-17

What you need to do is put plenty of echo's above the word hello, you will need to test it out to see how many you need, and the pause>nul after. To get rid of all test put cls after pause>nul. Here is an example: @echo off title my thing color 0a echo echo echo echo echo echo echo Hello! echo echo echo echo echo echo echo Pause>nul cls echo whatever you want next exit This is not exact, if you want a good example, check out my batch file programming tutorials, and look at the script. That is what i used and it worked great. If you need any more help just PM me and I'll get back to you. Hope I helped!

Select as Best AnswerUndo Best Answer

user
sharlston (author)XOIIO2009-05-18

would it be possible for you to write it then i can just copy and paste it because im not exactly a good wrtier ps dont feel im taking advantage of u cos im not

Select as Best AnswerUndo Best Answer

user
XOIIO (author)sharlston2009-05-18

I would gladly write some scripting for you, i quite enjoy batch programming. ( ahhh the memories ) just PM me what you would like it to do, and what you want it to display. It shouldn't take long.

Select as Best AnswerUndo Best Answer

user
sharlston (author)XOIIO2009-05-19
user
XOIIO (author)XOIIO2009-05-18

You will recieve a PERFECTLY centered word.

Select as Best AnswerUndo Best Answer

user
fwjs28 (author)XOIIO2009-05-17

or @echo off echo hello pause >null

Select as Best AnswerUndo Best Answer

user
XOIIO (author)fwjs282009-05-17

He wants it centered though, and that wont quite do it. I think he wants it in the dead ceter, horizontally and vertically.

Select as Best AnswerUndo Best Answer

user
sharlston (author)XOIIO2009-05-18

it doesent have to be perfect as im only a begginer to cmd i just want it visible

Select as Best AnswerUndo Best Answer

user
fwjs28 (author)XOIIO2009-05-17

hhh....then it'd would be more like @echo off echo hello pause >null

Select as Best AnswerUndo Best Answer

user
XOIIO (author)fwjs282009-05-17

Ummm.... either i'm blind, or you didn't change your answer?

Select as Best AnswerUndo Best Answer

user
fwjs28 (author)XOIIO2009-05-17

yeah, i typed it with spaces to space it over, but the formatting on instructables is ichy to change things around

Select as Best AnswerUndo Best Answer

user
XOIIO (author)XOIIO2009-05-17

By the way, if you want it to work well, put the word(s) in a box like in my tutorials, i highky suggest you look at the script for tricks i use.

Select as Best AnswerUndo Best Answer