0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Mac】コマンドで通知する方法

Posted at

通知を表示するコマンド

Macを使用してコマンドで通知を表示するには以下のようにコマンドを実行します。

osascript -e 'display notification "通知の内容" with title "タイトル" subtitle "サブタイトル"'

実際に実行すると以下のように通知が表示されます。
通知音はなりません。

osascript -e 'display notification "テストの通知です。" with title "タイトル" subtitle "サブタイトル"'

19DCE234-2E93-457F-876A-47F92FCEFFB3.png

また通知のスタイルは「スクリプトエディタ」の通知設定で変更できます。

32D79129-0A52-40DF-BC79-EBE9EABB1B3Cのコピー.png

通知が表示されない場合は「集中モード」の設定も合わせて確認してください。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?