アプリケーションにプラグインをインストールして、プラグインを有効にするためにアプリケーション本体を再起動するような場面があると思います。こんな時に役立つ再起動スクリプトです。
-- Script to relaunch an app using LaunchBar -- FredB http://geekthang.com open location "x-launchbar:hide" on open inputFiles try set inputFile to (POSIX path of ((first item of inputFiles) as string)) set appName to do shell script "basename -s .app " & quoted form of inputFile tell application appName to quit repeat 50 times tell application "System Events" if (exists process appName) then delay 0.3 else exit repeat end if end tell end repeat tell application appName to activate end try end open
スクリプトエディタでコンパイルして、適当な場所(e.g. ~/Library/Scripts/LaunchBar/)に保存します。
