LaunchBarからOmniFocusの同期動作を実行したいので、AppleScriptスクリプトを作成。
tell application "OmniFocus" synchronize document 1 end tell
LaunchBarからOmniFocusの同期動作を実行したいので、AppleScriptスクリプトを作成。
tell application "OmniFocus" synchronize document 1 end tell
LauchBarからGoogle検索するためには
LaunchBarアクティブにする→g→リターン→検索語入力
と、けっこう面倒なのでスクリプトを作った。
tell application "LaunchBar" activate delay 0.2 tell application "System Events" keystroke "g" delay 0.1 keystroke return end tell end tell
delayが無いとLaunchBarがキーストロークを拾いません。
環境によってはdelayの値を変更しないと行けないかも。
これをSparkでCtrl+Shift+Cmd+gにバインド。
LaunchBarからiTunesの再生中の曲にレートをつけるスクリプトを作成。Genius Mixでは利用できないみたい。
tell application "iTunes" set targetId to database ID of current track set targetTrack to item 1 of (every track of current playlist whose database ID is targetId) set ratings to {"・・・・・", "★・・・・", "★★・・・", "★★★・・", "★★★★・", "★★★★★"} set selectedItem to item 1 of {choose from list ratings} if selectedItem = false then return set selectedRating to item 1 of selectedItem if selectedRating = "・・・・・" then set ratingNumber to 0 else if selectedRating = "★・・・・" then set ratingNumber to 20 else if selectedRating = "★★・・・" then set ratingNumber to 40 else if selectedRating = "★★★・・" then set ratingNumber to 60 else if selectedRating = "★★★★・" then set ratingNumber to 80 else if selectedRating = "★★★★★" then set ratingNumber to 100 end if set rating of targetTrack to ratingNumber end tell
iTunes for Mac まとめ – AppleScriptを参考に作成。
tell application "iTunes" set targetTrack to rating of current track end tell if targetTrack = 0 then set hoshi to "・・・・・" else if targetTrack = 20 then set hoshi to "★・・・・" else if targetTrack = 40 then set hoshi to "★★・・・" else if targetTrack = 60 then set hoshi to "★★★・・" else if targetTrack = 80 then set hoshi to "★★★★・" else if targetTrack = 100 then set hoshi to "★★★★★" end if tell application "LaunchBar" display in large type hoshi delay 1 hide end tell
LaunchBarでiTunesで再生中の曲を表示するスクリプト。
デフォルトで有るんじゃないかと思ったけど、どれかわからなかったし、ネットで調べなくてもすぐ作れそうというわけで自作。
tell application "iTunes" set currentTrack to current track set theName to name of currentTrack as text set theArtist to artist of currentTrack as text end tell tell application "LaunchBar" display in large type theName with title theArtist delay 2 hide end tell
表示がかっこよくない気が…。
ForkLiftがAppleScriptに対応してないのでLaunchBarがForkLiftに対応してない。ので、AppleScriptのkeystrokeでなんとか開けるようにした。
on open theString set the clipboard to POSIX path of theString tell application "ForkLift" activate end tell tell application "System Events" keystroke "g" using {command down, shift down} keystroke "v" using command down keystroke return end tell end open
これを/Users/r_izumita/Library/Application Support/LaunchBar/Actionsに保存して、LaunchBarのIndexを更新。LaunchBarでフォルダを選択してこのスクリプトを実行すると、ForkLiftでフォルダが表示される。
ファイルの親フォルダを表示する機能は未実装。
Proudly powered by Wordpress and designed by code reduction