【问题标题】:Windows: How to display a non-blocking Alert/Confirmation window?Windows:如何显示非阻塞警报/确认窗口?
【发布时间】:2009-05-09 16:24:52
【问题描述】:

我想实现一个简单的确认/警报框,可以通过 CLI 使用 Windows XP/Vista 批处理脚本调用。

标准警报框似乎被阻止,这意味着整个批处理脚本将在警报窗口调用时停止,这不是我想要的。

如果需要编码,请提供示例或文档。语言可以是任何可编译的东西,不需要中间的虚拟机。

【问题讨论】:

    标签: windows batch-file blocking alert confirmation


    【解决方案1】:

    您可以使用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
    

    不阻塞。如果需要,它还具有在设定的时间后再次关闭消息框的良好功能。

    不过,在旁注中,您不应该真正使用这些东西。独白(例如带有 OK 按钮的消息框)的信息效率为 0%(参见 Jef Raskin:人性化界面。第 4-3 节:界面效率的测量Aza Raskin: Monolog Boxes and Transparent MessagesAza Raskin: Know When to Stop Designing, Quantitatively)。

    【讨论】:

    • 两个链接都坏了
    【解决方案2】:
    start MessageBox.vbs
    

    ...MessageBox.vbs 包含对 MsgBox 函数的调用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-29
      • 1970-01-01
      • 1970-01-01
      • 2019-11-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多