message box
Moderator: DosItHelp
Re: message box
paul.darsey wrote:how to make a message box in batch?
http://dl.dropbox.com/u/10434417/releases/commands/MSGBOX.exe
Use MSGBOX /? to get help.
Code: Select all
@echo off
for /f %%a in ('msgbox "Do you want to go to Google.COM?" "=D" 4g') do (set dog=%%a)
if "%dog%" EQU "Yes" (
start iexplore http://www.google.com/
)
When you set a message box, the result of whatever button you press is the output. Such as if I press "Abort" it will return "Abort".
Also, "4g" and "g4" are the same thing. "4" sets the message box to have the buttons "Yes" and "No". "g" sets it to a question box. The letters are not case sensitive.
Re: message box
paul.darsey wrote:that code didnt work....
You have to download MSGBOX.EXE and put it in the same folder as the BAT file.
I posted the link for a reason. >.>
But, if you do not wish to use any downloads, you can always use a temporary VBScript file.
Code: Select all
@echo off
set NLM=^
set NL=^^^%NLM%%NLM%^%NLM%%NLM%
echo x=msgbox("Pick one:",vbyesnocancel,"Test")%NL%wscript.echo(x) > ~tmp.vbs
for /f %%a in ('cscript ~tmp.vbs') do (set output=%%a)
del ~tmp.vbs
echo %output%
pause
Get some VBScript MSGBOX help here.
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: message box
search the forms paul it's all over the place.
You will not make a msgbox in batch you will make a message box in something that talks to the console.
You will not make a msgbox in batch you will make a message box in something that talks to the console.
Re: message box
You could also use MSG /?, this gives you a simple msgbox with OK button.
You can also send messages over the network but it requires that the messenger service is running on your pc !
use this command to start the service:
You can also send messages over the network but it requires that the messenger service is running on your pc !
use this command to start the service:
Code: Select all
net start messenger
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: message box
Ok are we talking about a message box as the one native to winxp msgbox or the net messenger service...
Re: message box
I am talking about the net messenger service.
It's a box, can place text in it, can press OK, makes a msgbox to me. Simple but effective.
It's a box, can place text in it, can press OK, makes a msgbox to me. Simple but effective.
Re: message box
Ed Dyreen wrote:You could also use MSG /?, this gives you a simple msgbox with OK button.
You can also send messages over the network but it requires that the messenger service is running on your pc !
use this command to start the service:Code: Select all
net start messenger
...Neat, actually. I didn't even know there was a msg command.
I thought net send and such was disabled on computers >= vista.