I have created a 'choose from list' in Applescript where the choices are lines in a .txt file. It looks like this:
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
This works very nicely, and if I 'return result', I get a list in the results window in the formal "urlx", "urlb" etc.
The problem is thaat when I try to save this list to a textfile, with, for example:
write result to newList
the formatting of the file is bizarre:
listutxtÇhttp://url1.htmlutxtÇhttp://url2.htmlutxt~http://url3.htmlutxtzhttp:// ...
It seems that null characters have been inserted, too. So, does anybody know what's going on? Can anybody think of a way to either:
a) write results as clean (preferably newline delimited) txt? b) clean this output so that it is back to normal?
Thanks for your time! Daniel