InDesignのJavaScriptからGrowlに通知を出す【OSX】
スクリプトからアラートを出す度にいちいちOKボタンを押すのも面倒なので、
AppleScript Support for Growlを参考にして
InDesignのJavaScriptからGrowlに通知できる関数を書いてみた。
function sendGrowlNotify(title,discription){ var growlNotify ='tell application "GrowlHelperApp"\r'+ 'set the allNotificationsList to {"indesign"}\r'+ 'set the enabledNotificationsList to {"indesign"}\r'+ 'register as application "Indesign Notify" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Adobe InDesign CS3"\r'+ 'notify with name "indesign" title "'+title+'" description "'+discription+'" application name "Indesign Notify"\r'+ 'end tell'; app.doScript(growlNotify , ScriptLanguage.APPLESCRIPT_LANGUAGE); }
#include 'InDesignSendGrowlNotify.js' sendGrowlNotify("お知らせ","スクリプトは無事終了しました。");