我想实现一个简单的确认/警报框,可以通过 CLI 使用 Windows XP/Vista 批处理脚本调用它。
标准警报框似乎被阻止,这意味着整个批处理脚本将在警报窗口调用时停止,这不是我想要的。
如果需要编码,请提供示例或文档。语言可以是任何可编译的东西,而无需介于两者之间的虚拟机。
我想实现一个简单的确认/警报框,可以通过 CLI 使用 Windows XP/Vista 批处理脚本调用它。
标准警报框似乎被阻止,这意味着整个批处理脚本将在警报窗口调用时停止,这不是我想要的。
如果需要编码,请提供示例或文档。语言可以是任何可编译的东西,而无需介于两者之间的虚拟机。
您可以使用该msg
工具:
Send a message to a user.
MSG {username | sessionname | sessionid | @filename | *}
[/SERVER:servername] [/TIME:seconds] [/V] [/W] [message]
username Identifies the specified username.
sessionname The name of the session.
sessionid The ID of the session.
@filename Identifies a file containing a list of usernames,
sessionnames, and sessionids to send the message to.
* Send message to all sessions on specified server.
/SERVER:servername server to contact (default is current).
/TIME:seconds Time delay to wait for receiver to acknowledge msg.
/V Display information about actions being performed.
/W Wait for response from user, useful with /V.
message Message to send. If none specified, prompts for it
or reads from stdin.
通话
msg * Some text
不阻塞。如果需要,它还具有在设定的时间后再次关闭消息框的好功能。
On a side note, though, you shouldn't really use those things. Monologs (like message boxes with exactly an OK button) have an information efficiency of 0 % (cf. Jef Raskin: The Humane Interface. Section 4–3: Measurement of Interface Efficiency or Aza Raskin: Monolog Boxes and Transparent Messages or Aza Raskin: Know When to Stop Designing, Quantitatively).
start MessageBox.vbs
...其中MessageBox.vbs
包含对 MsgBox 函数的调用。