How can I make a batch file in notpad, what shows you a pop-up?
Greetz, Bastiaan
How to make a pop-up?
Moderator: DosItHelp
Re: How to make a pop-up?
Hi beatboxx,
normally the batch window is also your interface to show messages. But you could use the MSG command, like
AFAIK those doesn't work higher than Win XP.
If so, you could use an implemented VBScript, like
Regards
aGerman
normally the batch window is also your interface to show messages. But you could use the MSG command, like
Code: Select all
@echo off
msg %username% My message.
AFAIK those doesn't work higher than Win XP.
If so, you could use an implemented VBScript, like
Code: Select all
@echo off &setlocal
set mbox="%temp%\msg.vbs"
>%mbox% echo MsgBox WScript.Arguments(0), 0, WScript.Arguments(1)
%mbox% "My message" "My title"
del %mbox%
Regards
aGerman
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
Re: How to make a pop-up?
You could use the "start" command to start, for instance, notepad with a message. I'm not completely clear on what you're looking to do.
echo Put the text you want here>tmp.txt
start /wait notepad tmp.txt
del tmp.txt
echo Put the text you want here>tmp.txt
start /wait notepad tmp.txt
del tmp.txt
-
- Posts: 16
- Joined: 29 Jan 2010 17:19
Re: How to make a pop-up?
this is an easy one. Code:
msg * Put Your Message Here.
Choice 2:
If you want an more up to date msgbox, then you may want to use VBS.Like Create msg.vbs, Right click and press Edit then Paste
lol = msgbox("Message Goes Here")
Save msg.vbs, then
Edit the .bat and put
@echo off
start msg.vbs
And That Should DO it
msg * Put Your Message Here.
Choice 2:
If you want an more up to date msgbox, then you may want to use VBS.Like Create msg.vbs, Right click and press Edit then Paste
lol = msgbox("Message Goes Here")
Save msg.vbs, then
Edit the .bat and put
@echo off
start msg.vbs
And That Should DO it
Re: How to make a pop-up?
@ !k
My VBScript will probably do the same:
msgbox.vbs
Syntax:
msgbox.vbs "Line1[\nLine2...]" "Title" ["Style"]
Styles:
OKONLY (default)
OKCANCEL
ABORTRETRYIGNORE
YESNOCANCEL
YESNO
RETRYCANCEL
Returns:
Button / Errorlevel:
Regards
aGerman
My VBScript will probably do the same:
msgbox.vbs
Code: Select all
Option Explicit
Dim n, Text, Title, Style, i, Msg
n = WScript.Arguments.Count
If n < 2 Then WScript.Quit 8
Text = Split(WScript.Arguments(0), "\n")
Title = WScript.Arguments(1)
If n > 2 Then
Style = WScript.Arguments(2)
Else
Style = "okonly"
End If
Msg = Text(0)
If UBound(Text) > 0 Then
For i = 1 To UBound(Text)
Msg = Msg & vbCrLf & Text(i)
Next
End If
Select Case UCase(Style)
Case "OKONLY"
Style = vbOKOnly
Case "OKCANCEL"
Style = VbOKCancel
Case "ABORTRETRYIGNORE"
Style = VbAbortRetryIgnore
Case "YESNOCANCEL"
Style = VbYesNoCancel
Case "YESNO"
Style = VbYesNo
Case "RETRYCANCEL"
Style = VbRetryCancel
Case Else
Style = vbOKOnly
End Select
WScript.Quit MsgBox(Msg, Style, Title)
Syntax:
msgbox.vbs "Line1[\nLine2...]" "Title" ["Style"]
Styles:
OKONLY (default)
OKCANCEL
ABORTRETRYIGNORE
YESNOCANCEL
YESNO
RETRYCANCEL
Returns:
Button / Errorlevel:
- OK / 1
- Cancel / 2
- Abort / 3
- Retry / 4
- Ignore / 5
- Yes / 6
- No / 7
- Error / 8
Regards
aGerman
Re: How to make a pop-up?
aGerman
Cool. I just do not understand anything in VBS
Cool. I just do not understand anything in VBS