私はApplescript
を新しくしていて、テキスト文書(.html)を使用して実行できるスクリプトを作成しようとしています。&はExcelの対応するフレーズ資料。Applescript Excelシートのテキスト文書を検索して置換する
私は、彼らは、細胞ExcelドキュメントでB1-B9
を使用して順番に交換する必要があります... B_1 (first value to replace), B_2 (second), B_3
などとして交換するテキストに
をプレースホルダを配置します。 Excelドキュメントのフレーズは毎回変更されるため、標準ではなくキャプチャするために動的でなければならないのはなぜですか&スクリプトを静的な値に置き換えます。
私はすべてが理にかなってこのスレッドを追ってきた:https://discussions.apple.com/thread/7008048?start=0&tstart=0
しかし、私はコンパイルエラーに実行し続けます。ここに私の現在のコードは次のとおりです。
tell application "Microsoft Excel"
set colB_data to value of every cell of range "B1:B9" of worksheet 1 of document 1
end tell
tell application "Sublime Text"
tell text of "Users/maxquinn/Desktop/index.html"
repeat with index from 1 to count colB_data
replace ("B_" & index as text) using (item index of colB_data) options {starting at top:true, match words:true}
end repeat
end tell
end tell
前半はうまく動作しますが、後半は私にエラー"Expected end of line but found identifier."
を与え、'replace' command (line 8)
で'using'
を強調しています。
これがなぜ起こったのか誰にもわかっていて、スクリプトに他の目障りなエラーはありますか?
ありがとうございます!
将来的に誰のための最大