我在Applescript中创建了一个'从列表中选择',其中的选项是.txt文件中的行。它看起来像这样:applescript从列表结果中选择
set listofUrls to {}
set Urls to paragraphs of (read urlList)
repeat with nextLine in Urls
if length of nextLine is greater than 0 then
copy nextLine to the end of listofUrls
end if
end repeat
choose from list listofUrls with title "Refine URL list" with prompt "Please select the URLs that will comprise your corpus." with multiple selections allowed
这个作品非常漂亮,如果我返回结果',我得到在正式的“网址X”结果窗口列表“urlb”等
的问题是看过那部当我尝试这个列表保存到一个文本,用,例如:
write result to newList
文件的格式是奇怪:
列表utxtÇhttp://url1.htmlutxtÇhttp://url2.htmlutxt~http://url3.htmlutxtzhttp:// ...
似乎空字符已经插入了。那么,有人知道发生了什么吗?任何人都可以想办法:
a)写结果为干净(最好是换行符)txt? b)清理这个输出,使其恢复正常?
谢谢你的时间! 丹尼尔
我可以看到你的文件写入代码,那是你遇到问题的地方 – mcgrailm