SC, Image Files and MPI

Adding files 2

So we want to change our script to add files to the list, rather than replace the previous file.

on mouseUp
answer picture file "Choose an image:"
if it is empty then exit mouseUp
put it into tFilePath
set the itemDel to colon
put last item of tFilePath into tFileName
if the number of lines in cd fld "imagelist" = 0
then
--we do these same as before
put tfileName into cd fld "imageList"
set the uImagePaths of cd fld "imageList" to tFilePath
else
--we add the list
put CR&tfileName after cd fld "imageList"
--CR is a constant for the return character
set the uImagePaths of cd fld "imageList" to the uImagePaths of cd fld "imageList"&CR&tFilePath
end if
end mouseUp