2016-08-22 16 views
0

メッセージアプリケーションの特定のアカウントから画面共有の招待状を自動的に受け入れます。Appleスクリプトで構文エラーが発生しています

私はオートAccept.applescriptに行って、次

on received local screen sharing invitation from theBuddy for theChat 
    accept theChat 
end received local screen sharing invitation 

を追加しましたが、私はそれを保存しようとすると、私は与えられた「期待構文エラー 『を取得する』、 『に』、 『持ちます』、「 "または"他のパラメータ名が "ローカル"が見つかりません。 "

私には何が欠けていますか?

答えて

0

基本的には

using terms from application "Messages" 


end using terms from 

ブロック内のコードをラップする必要があります。しかし、どのバージョンのMessages.appにはon received local screen sharing invitation from theBuddy for theChatというイベントがありますか?

編集

画面共有の招待状はビデオ招待され、イベントlocal screen sharing invitationが存在しません。

using terms from application "Messages" 
    on received video invitation theText from theBuddy for theChat 
     set buddySN to (get handle of theBuddy) 
     set allowedBuddy to "myAccount" 
     if (buddySN is allowedBuddy) then 
      accept theChat 
     end if 
    end received video invitation 
end using terms from 
+0

特定のユーザーからの画面共有の招待を自動的に受け入れるにはどうすればよいですか?私はel capitanを使用しています –

+0

"myAccount"を受け入れるリンゴIDに変更しますか? –

+0

はい、 'handle'は電子メールアドレスまたは電話番号またはAIM名を表します。 – vadian

関連する問題