Computer Hope
Microsoft => Microsoft DOS => Topic started by: linuxyf on July 02, 2008, 02:23:13 AM
-
Can i Create a MessageBox with appointed caption and displaying message using batch command??
-
Yes, sort of
You can create a short vbscript file with the messagebox in it, you could write the response from the messagebox to a file and read that in your bat
Graham
-
i know i can start a exe file displaying a messagebox implemented by c or c++.
but i want to know whether i can start a messagebox directly with batch command or not.
-
but i want to know whether i can start a messagebox directly with batch command or not
Batch code does not support messageboxes, popups, or windows. However this little novelty script maybe helpful:
@echo off
start %comspec% /c "mode 40,10&title My Popup&color 1e&echo.&echo. Today is %date%&echo.&echo. Press a key!&pause>NUL"
This is one of those scripts where you keep asking "What was I thinking"
8)
-
What about:
msg * Hello!!!!!!!!!!
That works in Command Prompt and in a batch file.
-
echo msgbox"yourmesagehere">a.vbs,&;a.vbs <<to display once
echo for i = 1 to 10>a.vbs &;echo msgbox"yourmessagehere">>a.vbs &;echo next>>a.vbs << to display 10 times
-
echo msgbox"yourmesagehere">a.vbs,&;a.vbs <<to display once
That doesn't work, gives a VBS compilation error.
This does
echo msgbox"your message here">a.vbs&a.vbs
(The semicolon and comma were causing the error)
-
that was a typo sorry,
echo msgbox"yourmesagehere">a.vbs &;a.vbs is what i ment instead.
-
that was a typo sorry,
echo msgbox"yourmesagehere">a.vbs &;a.vbs is what i ment instead.
You don't need the semicolon (';')
This is tidier because it deletes the vbs afterwards
echo msgbox"your message here">a.vbs&a.vbs&del a.vbs