repeat loop problems!

I just cant figure how to write what i want to do, there it is:

I want to get the name of every attachment as string in a email, but i want each name to be separated by a comma, or [return] or hyphen

I dont know how to make a repeat command to repeat that with each attachment, cause if i dont use a repeat command and go with a sentence like this:

set myAttachment to name of every attachment as string

I get all the names side by side without anything between each items.

Can somebody help me doing this thing that is probably simple for one of you!

Set applescript's text item delimiters to ", "
set myAttachment to name of every attachment as string
set applescript's text item delimiters to ""
return myAttachment

Thank you so much :slight_smile:

You’re welcome:D