![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-05 07:42 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS批处理 & 脚本技术(批处理室) » Who can help list the kinds of VBS pop-up boxes? [Solved] |
| Printable Version 1,548 / 11 |
| Floor1 heicai | Posted 2007-04-29 00:52 |
| 中级用户 Posts 156 Credits 385 | |
|
Who can help list the kinds of VBS pop-up boxes? Please help list them for me. Thanks
[ Last edited by heicai on 2007-6-29 at 07:49 PM ] |
|
| Floor2 heicai | Posted 2007-04-29 00:55 |
| 中级用户 Posts 156 Credits 385 | |
|
What's the shortest code to pop up that kind of dialog box with only an OK button?
|
|
| Floor3 zhoushijay | Posted 2007-04-29 01:16 |
| 高级用户 Posts 375 Credits 845 | |
|
msgbox("Hello")
|
|
| Floor4 heicai | Posted 2007-04-29 01:22 |
| 中级用户 Posts 156 Credits 385 | |
|
How do you add a title???
|
|
| Floor5 heicai | Posted 2007-04-29 01:22 |
| 中级用户 Posts 156 Credits 385 | |
|
Can it be used in bat and cmd?
|
|
| Floor6 zhoushijay | Posted 2007-04-29 01:28 |
| 高级用户 Posts 375 Credits 845 | |
| Floor7 heicai | Posted 2007-04-29 01:33 |
| 中级用户 Posts 156 Credits 385 | |
|
So that means you can't pop up a box directly in BAT?? Some antivirus software may give false positives when generating vbs.
|
|
| Floor8 zhoushijay | Posted 2007-04-29 01:36 |
| 高级用户 Posts 375 Credits 845 | |
|
I use Kaspersky
I found that as long as vbs doesn't operate on files/the registry and so on, it won't be detected by antivirus software. |
|
| Floor9 heicai | Posted 2007-04-29 01:58 |
| 中级用户 Posts 156 Credits 385 | |
|
Thanks for the explanation!
|
|
| Floor10 lxmxn | Posted 2007-04-29 04:01 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Remember to search.
|
|
| Floor11 heicai | Posted 2007-06-29 19:28 |
| 中级用户 Posts 156 Credits 385 | |
|
Let me ask, can this kind of pop-up box as shown in the picture be imitated with VBS??
Attachments 1.JPG (11.37 KiB) |
|
| Floor12 heicai | Posted 2007-06-29 19:48 |
| 中级用户 Posts 156 Credits 385 | |
|
I've already found the relevant materials. Sharing them with everyone as well.
How to use msgbox Description Displays a message in a dialog box, waits for the user to click a button, and returns a value indicating which button the user clicked. Syntax MsgBox(prompt[, buttons][, title][, helpfile, context]) The MsgBox function syntax has the following parameters: Parameter Description prompt A string expression displayed as the message in the dialog box. The maximum length of prompt is about 1024 characters, depending on the width of the characters used. If prompt contains multiple lines, the lines can be separated with a carriage return (Chr(13)), a line feed (Chr(10)), or a carriage return/line feed combination (Chr(13) & Chr(10)). buttons A numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the message box modality. For the values, see the "Settings" section. If omitted, the default value for buttons is 0. title A string expression displayed in the title bar of the dialog box. If title is omitted, the application name is displayed in the title bar. helpfile A string expression identifying the help file used to provide context-sensitive Help for the dialog box. If helpfile is provided, context must also be provided. Not available on 16-bit system platforms. context A numeric expression identifying the Help context number assigned to a help topic by the help file author. If context is provided, helpfile must also be provided. Not available on 16-bit system platforms. Settings The buttons argument can have the following values: Constant Value Description vbOKOnly 0 Displays the OK button only. vbOKCancel 1 Displays OK and Cancel buttons. vbAbortRetryIgnore 2 Displays Abort, Retry, and Ignore buttons. vbYesNoCancel 3 Displays Yes, No, and Cancel buttons. vbYesNo 4 Displays Yes and No buttons. vbRetryCancel 5 Displays Retry and Cancel buttons. vbCritical 16 Displays the Critical Message icon. vbQuestion 32 Displays the Warning Query icon. vbExclamation 48 Displays the Warning Message icon. vbInformation 64 Displays the Information Message icon. vbDefaultButton1 0 The first button is the default. vbDefaultButton2 256 The second button is the default. vbDefaultButton3 512 The third button is the default. vbDefaultButton4 768 The fourth button is the default. vbApplicationModal 0 Application modal: the user must respond to the message box before continuing work in the current application. vbSystemModal 4096 System modal: all applications are suspended until the user responds to the message box. The first group of values (0 - 5) describes the type and number of buttons displayed in the dialog box; the second group of values (16, 32, 48, 64) describes the icon style; the third group of values (0, 256, 512) determines the default button; and the fourth group of values (0, 4096) determines the message box modality. When adding these numbers to generate the value of the buttons argument, only one number may be taken from each group. Return values The MsgBox function has the following return values: Constant Value Button vbOK 1 OK vbCancel 2 Cancel vbAbort 3 Abort vbRetry 4 Retry vbIgnore 5 Ignore vbYes 6 Yes vbNo 7 No |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |