如果我正确理解你的要求,
,那么这里有一种方法可以做到。
set theFileOfPromptsList to {}
set theFileOfPrompts to read "/path/to/FileOfPrompts"
repeat with i from 1 to count of paragraphs in theFileOfPrompts
set end of theFileOfPromptsList to paragraph i of theFileOfPrompts
end repeat
set theFileOfPromptsList to {}
set theFileOfPrompts to read "/path/to/FileOfPrompts"
repeat with i from 1 to count of paragraph in theFileOfPrompts
if paragraph i of theFileOfPrompts is not "" then
set end of theFileOfPromptsList to paragraph i of theFileOfPrompts
end if
end repeat