Introduction: How to Make a Message Box in Notepad

Picture of How to Make a Message Box in Notepad

Hi there. I'm going to teach you how to make a message box. All you need is Notepad. If you have any comments, feel free to post them. Just start learning and have fun!

Step 1: Step 1: Typing the Text

Picture of Step 1: Typing the Text

First, open Notepad and type this:

x=msgbox(box text,buttons,box title)

On the part where it says "box text", type the text you want on the window (with quotation marks). On the "box title", type the title of the message box the same way you typed the text. On "buttons" type a number (without quotation marks):

0: Normal message box
1: OK and Cancel
2: Abort, Retry, Ignore
3: Yes, No, Cancel
4: Yes and No
5: Retry and Cancel
16: Critical message icon
32: Warning query icon
48: Warning message icon
64: Information message icon
4096: Always stay on top of the desktop

Step 2: Step 2: Saving the File

Picture of Step 2: Saving the File

When you're done, save it as a VBS(or VBScript)file. To do this, type ".vbs" at the end of the title and change the "Text Document (*txt)" in the "Save as type" select box to "All Files" .

Example: File name: Fake_Virus.vbs
Save as type: All Files

Step 3: The End

Picture of The End

Congratulations! You've done it. To have fun, why don't you make a message box disguised as a "fake" trojan horse on your friend's computer, create a shorcut, rename it, change the icon, lure your friend to click it, and watch them freak out!
As I said, feel free to post any comments.

Comments

jitske.hibma (author)2015-02-22

I, m sorry, did'nt get the point. This is what I saved as what was thought:

x=msgbox(box "mailbox",0,"veldfiets"), saved as .vbs, all type of files, in Documents.

Nothing happens on opening the .vbs file: not able to open etc. etc.

What is the clue here?

you have to save it as ".bat" that's why it did not work.

no you have to save it as .vbs

Wrong saving it as .bat is used in batch programming. Codes in batch is like @echo off

color 0a

title hello world

:start

echo Hello World

pause

vbscript would not run in batch so something is wrong with your method. Make sure your syntax is wright and save as whatyouwant.vbs but don't forget *.vbs. :)

Well, first there is an unknown tag: "bat" located in the parenthesis. If it is working properly, then this should at least pop up as an error, so I don't know why it is not working at all. This only runs on Windows (this could be it)

NickG9 (author)jitske.hibma2015-08-12

x=msgbox(box "mailbox",0,"veldfiets") is the wrong code. Try

x=msgbox("mailbox",0,"veldfiets")

Ok?

whops. never mind. i had wrong

lolcat360 (author)2008-08-21

i made one where you click on it and your computer starts being mean and tells you to take the disc out

lolcat360 (author)lolcat3602008-08-21

its here

lolcat360 (author)lolcat3602008-08-21

answer=MsgBox("Hi, this is your computer.",0,"HI")
answer=MsgBox("I'm tired of you jamming discs into me.",0,"HI")
answer=MsgBox("Can you please take the disc out, like NOW???",0,"HI")
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.cdromCollection

if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next ' cdrom
End If

DYLEGO (author)lolcat3602008-11-05

it no work!!!

JeffersonL20 (author)DYLEGO2017-07-11

yes it does. just screenshot your problem with snipping tool and add it to your comment so the developing pros can help you solve it

MineblockRULEZ (author)lolcat3602015-12-05

I used the ejecting code to make a cool EJECT DISC button on my desktop!

Peekofwar5889 (author)lolcat3602015-11-13

HAHAA!!!!! Windows Defender thought this was a medium threat!!

wilson21 (author)lolcat3602009-04-06

Great it works

kenneththewizard (author)2014-03-04

Hi! About a year ago I was looking at this... well it didn't
work when I tried it but I was quickly able
to discern a proper message box from what you had.

Here is what I did, no error message:

x=msgbox (“whatever you want message box to say here” ,0, ”title here”)
> “msgbox.vbs”

Peekofwar5889 made it! (author)kenneththewizard2015-11-14

Microsoft VBScript compilation error:

Line: 1
Char: 11
Error: Invalid character
Code: 800A0408

hi there Peekofwar5889, just retype all the quotation marks. it should work.

DarkG4 (author)2017-07-07

Please help.

JeffersonL20 (author)DarkG42017-07-11

check it. it says expected ')' so check if you left out any ')'s. in the picture, its missing a ) so that an example of how that mistake was made.

JeffersonL20 (author)DarkG42017-07-11

just retype the quotation marks

BlueberryB made it! (author)2017-06-27

IT WORKED!!!

KorbenW (author)2017-06-21

is there anyway you can make the message change colours repeatedly

CautionusSky45. made it! (author)2016-12-03

i did it it worked!

Roberto_- (author)2015-12-20

what do i save it as?

BlazeN2 (author)Roberto_-2016-10-16

Save it as .vbs

MayaS28 (author)2016-09-26

Doesn't work ;'(

GreyFascader (author)2016-06-19

you have to save it as either .bat or .vbs, im not sure but from the looks of it i'd say .vbs

SpitrayG (author)2016-01-18

This is going to be usefull. >:D

O-mer (author)2015-11-07

Hey,

Is it possible to attach the message file to a program?

For example: when opening a program, the message that you created will pop-up and when you click ok it continues and runs the program...

millsasbc (author)2010-12-08

Hi could you please answer theese questions for me,
1. how do i make something happen when i click one of the buttons
2. how do i make the message box automatticaly open when i log on

thnaks could you please reply to this comment at millsasbc@gmail.com
thanks

VictorS10 (author)millsasbc2015-08-12

Well I know how to make it run when you log on to windows.

Here's how:

Open Start Menu >> Drag application to startup folder >> Enjoy!

Mr_ MikaS (author)2015-07-01

This is so cool, thanks for the instructable.
Could you make one for windows 8.1?

NickG9 (author)Mr_ MikaS2015-08-12

It is the same thing. Any computer that has Windows XP or higher will be able to make it.

Mr_ MikaS (author)NickG92015-08-12

Thank you very much.

UmairY (author)2015-04-15

How can i create a never endind dailog box and it will display when computer start

meowk (author)2015-04-09

mines not a virus, its for making people welcome.

TheGenius (author)2008-12-30

NICEEE!!! i did it wiz my sis, she tought there was a virus!!!!!!! she started to cry ( btw i knew how to make this cz i am a pc n internet engeneer) if any help needed , add me at : samer_genius@hotmail.com

meowk (author)TheGenius2015-04-09

oh if u wana message me, here my email meowkitty.periodaa@gmail.com

GarrettM1 (author)2015-03-24

awesome

JacobH5 (author)2015-02-21

great job, do you think you could show how to do it on windows 8.1?

NickD5 (author)JacobH52015-03-13

The same EXACT way.

jitske.hibma (author)2015-02-22

I, m sorry, did'nt get the point. This is what I saved as what was thought:

x=msgbox(box "mailbox",0,"veldfiets"), saved as .vbs, all type of files, in Documents.

Nothing happens on opening the .vbs file: not able to open etc. etc.

What is the clue here?

NickD5 (author)jitske.hibma2015-03-13

There should be spaces between the quotation marks and the commas and there shouldn't be the word "box" inside the parentheses.

DeundraT (author)2015-03-13

works right out the gate on win 7, 8 , 8.1 i have this process automated on certain computer within my company to remind users of daily task

Thanks

ekatris (author)2014-11-22

how do you make it that it responds so if you put button #2 and they click retry how do you make it that it will make a new message or use the same

habibieboy (author)2014-07-23

Hi there.... i wanna ask, how could I change the dialog box's icon on the taskbar? So it's more fun if i can do that.

sonicmario (author)2013-03-19

i have made one but it doesn't work it is in dutch so you may not understand it.
here it is:
x=msgbox ("klik op yes", 4,"wees verstandig")
if x=6 then
msgbox "goed zo", 0,":)"
msgbox "kijk jij bent slim"
want er zijn ook mensen die op nee klikken en die krijgen nog een lang verhaal hierachter aan.", 0,"druk op ok"
elseif x=7 then
msgbox "waarom klik je toch op no?", 0,">|"
msgbox "ik zei dat je op yes moest klikken en toch doe je het niet."
msgbox "ik ga je de vraag nog eens stellen. (het is geen vraag maar toch. jij klikt op no :p)", 0,"klik op ok"
msgbox "klik op yes", 4,"wees verstandig"
if x=6 then
msgbox "goed zo", 0,":)"
msgbox "nee grapje. dat zou te gemakkelijk zijn", 0,"lol"
msg* suc6 ermee
goto 12345
elsif x=7 then
msgbox "serieus doe je het alweer.", 0,"jij zit in de problemen."
msgbox "klik maar op ok dan ben je er vanaf.", 0,"doei"
end if

type it (or just copy it) in your notepad and please fix the problems. but only if you want to
you can mail me @
nando.kools@live.nl

jcdwalle (author)2013-03-12

I can't download. Help?

scano1 (author)2013-01-20

Hello i'm planning to make a .vbs on notepad itembox popup then enter choices a, b, c ,d and the value of letter i inserted is

a=1

b=2

c=3

d=4

then when i type "a"on first itembox and hit enter there will be another popup itembox with the same choices example i choose "b"

when i hit enter the total of first and second itembox will be computed and write on registry NoDriveTypeAutoRun dword value

on this registry

Before script run:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoDriveTypeAutoRun"=dword:00000000

After script run:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]

"NoDriveTypeAutoRun"=dword:00000003




can you give me code for the .vbs or .vbe or .hta using notepad please[:'(]

About This Instructable

202,303views

21favorites

License:

Bio: I'm the left leg of the computer Ultimate but I have access to the web because there's a wire connecting me to the ... More »
More by 4_t477_guy:Display the BSoD with 3 keystrokesVista-lizing your old XP computer: the ultimate tutorialHow to make a message box in Notepad
Add instructable to: