I have a Script where I can drop files into a box and the result is a filelist in an textviewitem. when I drag again some objects the list is cleared and I have a new list with the new files. this is because I set thedatatext to “”. How do I have to change the code, that when I drag another file, the file will be added to the list?
thx - M.
on conclude drop theObject drag info dragInfo
set preferred type of pasteboard of dragInfo to "file names"
set fileList to contents of pasteboard of dragInfo
set theDataText to ""
repeat with currentItem in fileList
tell application "Finder"
set theDataText to theDataText & (currentItem as reference) & return
tell window "main" to set contents of text view "file data" of scroll view "file data scroll" to theDataText
set preferred type of pasteboard of dragInfo to ""
end conclude drop