2016-07-17 9 views
3

キーボードショートカットを使用してホットコーナーを無効/有効にする方法を知りたいと思っていました。 私は、Automatorの中にこのスクリプトを実行するたびに、それは動作しますが、キーボードショートカットにそれを取り付けた、 オートメーターエラーのAppleScriptエラー(「AppleScriptを実行してエラーが発生しました」)

property theSavedValues : {"Mission Control", "Desktop", "Dashboard", "Launchpad"} -- for example 

tell application "System Preferences" 
    set current pane to pane id "com.apple.preference.expose" 
    tell application "System Events" 
     tell window "Mission Control" of process "System Preferences" 
      click button "Hot Corners…" 
      tell sheet 1 
       tell group 1 
        set theCurrentValues to value of pop up buttons 
        if theCurrentValues is {"-", "-", "-", "-"} then 
         repeat with i from 1 to 4 
          set thisValue to item i of theSavedValues 
          tell pop up button i 
           click 
           click menu item thisValue of menu 1 
          end tell 
         end repeat 
        else 
         copy theCurrentValues to theSavedValues 
         repeat with i from 1 to 4 
          tell pop up button i 
           click 
           click last menu item of menu 1 
          end tell 
         end repeat 
        end if 
       end tell 
       click button "OK" 
      end tell 
     end tell 
    end tell 
    quit 
end tell 

は、だから私はこのリンゴのスクリプトとAutomatorの中でサービスを作成し、このリンゴのスクリプトを見つけましたが、私はショートカットを打ったとき、イム取得します"アクションAppleScriptを実行する"エラーが発生しました "。 これを解決するために何ができるでしょうか? ありがとう

答えて

6

私はとても愚かな気がします。唯一必要なことは、私がこのサービスを使用しているアプリにアクセシビリティのアクセス許可を与えることでした。

+0

これをどうやって説明しましたか? –

+2

(Mac OS)の設定 - >セキュリティとプライバシー - >アクセシビリティ - >サービスを実行しているアプリを見つけてください。私の場合、Finder – beretis

+4

あなたはダムではありません!このエラーメッセージはゴミです! – Meekohi

関連する問題