3

CLIでWindows XP/Vistaのバッチスクリプトを使って呼び出せる簡易確認・アラートボックスを実現したい。

標準のアラート ボックスがブロックされているようです。これは、バッチ スクリプト全体がアラート ウィンドウの呼び出し時に停止することを意味しますが、これは私が望んでいるものではありません。

コード化する必要がある場合は、例またはドキュメントを提供してください。言語は、間に仮想マシンを必要とせずにコンパイル可能なものなら何でもかまいません。

4

2 に答える 2

5

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% です (cf. Jef Raskin: The Humane Interface . Section 4–3: Measurement of Interface EfficiencyまたはAza Raskin: Monolog Boxes and Transparent MessagesまたはAza Raskin:いつ設計をやめるべきかを定量的に知る)。

于 2009-05-09T17:10:41.753 に答える
4
start MessageBox.vbs

...ここMessageBox.vbsには、MsgBox 関数への呼び出しが含まれています。

于 2009-05-09T16:27:53.553 に答える