4

OS X のリマインダー アプリでアクティブなリストを表示するのを手伝ってくれる人はいますか?

リマインダーの AppleScript 辞書によると、アプリケーションには「リマインダー アプリケーションで現在アクティブなリスト」である「デフォルト リスト」プロパティがあります。

ただし、このプロパティは、実際に表示されてアクティブになっているリストではなく、常にリスト サイドバーの最初のリストを返すようです。サイドバーのリストの順序を並べ替えると、実際に表示および操作されているリストに関係なく、最初に作成したリストが常に取得されることがわかりました。

私のアプリケーションは、AppleScript を実行して現在取り組んでいるリストを印刷する Keyboard Maestro トリガーを作成することですが、リマインダー アプリがその辞書に記載されているように機能するようには見えません。(印刷したいものを選択できるように、すべてのリストを一覧表示するセレクターをスクリプトにポップアップ表示させるという回避策を一時的に使用しましたが、それは非効率的で洗練されていません)。

ありがとう!

4

1 に答える 1

2

はい、できますが、悪い GUI スクリプトを使用する必要があります。そして悪い意味で。見て:

--Do some GUI scripting to get the decription of a specific group
tell application "Reminders" to activate
tell application "System Events"
    tell process "Reminders"
        tell window "Reminders"
            tell splitter group 1
                tell group 1
                    set des to get description
                end tell
            end tell
        end tell
    end tell
end tell

--This description is in the format "Viewing MyList, 1 reminder" so get the part to the "," from des.
set text item delimiters to ","
set texitems to text items of des
set firstPart to get text item 1 of texitems

--Setting the delimiters back
set text item delimiters to ""

--Jump to charcter 9 of firstPart then converting to text
set listname to characters 9 thru end of firstPart as text

--Now we know the name of the current list, so do whatever you want:
tell application "Reminders" to get list listname

これは機能します。ただし、リマインダーが開いている場合のみ。Apple がリマインダーの構造を変更した場合...

于 2013-09-30T17:30:36.353 に答える