tell application "TextEdit"
activate
set source_doc to open file "source 1.txt"
set source_doc2 to open file "source 2.txt"
set destination_doc to make new document
delay 1
make new paragraph ¬
at end of every paragraph of text of destination_doc
duplicate every paragraph of text of source_doc ¬
to end of every paragraph of text of destination_doc
duplicate every paragraph of text of source_doc2 ¬
to end of every paragraph of text of destination_doc
end tell
OR
tell application "TextEdit"
activate
(choose file) as string
set source_doc to the result
delay 0.2
(choose file) as string
set source_doc2 to the result
delay 0.2
set source_doc to open file source_doc
set source_doc2 to open file source_doc2
set destination_doc to make new document with properties {name:"combined", name extension:"txt"}
delay 0.2
make new paragraph ¬
at end of every paragraph of text of destination_doc
delay 0.2
duplicate every paragraph of text of source_doc ¬
to end of every paragraph of text of destination_doc
delay 0.2
duplicate every paragraph of text of source_doc2 ¬
to end of every paragraph of text of destination_doc
end tell
答案完全取决于具体的方式是什么 - 所以你将需要更forthco明! –
因此,我们将第一个文件的第一行和第二个文件的第一行写入第三个文件。我们如何推断第一个文件,第二个文件和输出文件的名称? –
显示你的方法 –