Change the comma and space in the line set the text item delimiters of AppleScript to ", "
to return
. The new line (no pun intended) looks like this:
set the text item delimiters of AppleScript to return
关于你的第二个问题:
set AppleScript s text item delimiters to ""
return text items 2 thru -2 of some_string
Let s put it all together!
set some_file to "Macintosh HD:Users:Zade:Library:Application Support:Notational Data:Words.txt" as alias
set the_text to read some_file as string
set the_lines to (every paragraph of the_text)
set this_line to some item of the_lines
if this_line is not "" then
set AppleScript s text item delimiters to ""
set this_line to (text items 2 thru -2 of this_line) --remove the quotes
set AppleScript s text item delimiters to space
set these_items to (every text item of this_code)
set the this_line to (item 1 of these_items & this_line)
set AppleScript s text item delimiters to ""
return this_line
end if
www.un.org/esa 你可以阻止该方案返回空线,但你可以把空线过滤出去。
if paragraph i of some_text is not "" then do_something()