AppleScript表示ダイアログと通知でカスタムアイコンを使用する方法はありますか? AppleScriptのドキュメントでカスタムアイコン付きのAppleScript表示ダイアログ
それが表示ダイアログについてこう述べています。
with icon
(text | integer)
The resource name or ID of the icon to display.
with icon
(stop | note | caution) The type of icon to show. You may specify one of the following constants:
- stop (or 0): Shows a stop icon
- note (or 1): Shows the application icon
- caution (or 2): Shows a warning icon, badged with the application icon
with icon
(alias | file) An alias or file specifier that specifies a .icns file.
だから、あなたはあなた自身のアイコンを使用することができますように、それは縫い目が、私は次のコードを動作させることはできません。
display dialog "Text" with icon "/Users/user/Desktop/asd.icns"
「リソースが見つかりません」というエラーが表示されます。
目的は、表示ダイアログを使用せず、代わりに表示通知を使用することです。
これは動作していないようです。そして、私は通知ではうまくいかないと思う。 – WalterBeiter
これはうまくいきますし、正しく表示されますが、 'display dialog'のみで動作しますが、' display notification'では動作しません。後者はAppleScriptランナーアプリケーションをターゲットとして使用し、 'icon'パラメータを提供しないためです。 – vadian