私の小さなapplescriptでアクションプロパティエラーが発生しました。ここではスクリプトがあります:applescriptサブルーチンとアクションのプロパティ
tell application "evernote" to activate
tell application "System Events"
--tell process "evernote"
set the clipboard to text_content()
keystroke "v" using command down
keystroke return
--end tell
end tell
return input
end run
ここではサブルーチンは、これが私のアクションプロパティのエラーを示しているメインプログラムの後
on text_content()
delay 1
tell application "Safari" to set theURL to URL of front document
set theDate to do shell script "date +'%d-%m-%Y'' - '%T"
set theusertext to " , "
set get_text to (theURL & return & theusertext & theDate) as string
return get_text
end text_content
です。私はスクリプト全体のさまざまな場所でプロパティとしてget_textを定義しようとしましたが、同じエラーが発生しています。どのようにそれに対処するためのガイダンス?
あなたが提供したスクリプトを実行すると、まったくエラーは発生せず、予想される動作をします。スクリプトエディタで直接実行しますか?もしそうなら、お使いのOSのバージョンは? – rems4e
はい、あなたは正しいです、私は自分の投稿を編集しました。スクリプトのさまざまな部分に問題があります。 – lawsome
サブルーチンを実行できません。それはオートメーターにあり、リンゴのスクリプトではありません。 – lawsome