2

テキストファイルに番号が書かれています。テキスト ファイルの番号に別の番号を追加してから、古い番号を新しい番号に置き換えることはできますか? 私のコードは次のとおりです。

set theFile to POSIX path of "Users:Tyler:Documents:File.txt"
open for access theFile
set theFileContents to read theFile

set theNewFile to run script theFileContents + 1
tell application "TextEdit"
set eof of theFileContents to 0
write theNewFile to theFileContents
4

1 に答える 1