Question about lists {}

I have a question about 2 lines of code in this script, which gets the name of each file in the front finder window and puts those names in a text edit document

tell application "Finder"
	set these_items to sort (get every document file of the front Finder window) by physical size
	set these_names to {}
	repeat with i from 1 to the count of these_items
		set the end of these_names to the name of (item i of these_items)
	end repeat
end tell
set AppleScript's text item delimiters to return
set the item_list to these_names as string
set AppleScript's text item delimiters to {""}
--make new document with text
tell application "TextEdit"
	make new document
	set text of document 1 to the item_list
end tell

Here are the 2 lines in question…
1-set these_names to {} - I assume these curly braces mean list {}
2-set AppleScript’s text item delimiters to {“”} - I am not sure what the “” marks mean in the braces?

Can anyone help me with these 2 lines…the rest of the code I think I understand :wink:



1 - {} represents an empty list
2 - text item delimiters were designed to contain a list of string values, although until Leopard only the first item is considered. The default value of text item delimiters is list containing an empty string represented by two quotes “”

HI Stefan!
Got it…

there is one more in here if you or anyone else could explain…in the line that reads:

set the end of these_names to the name of (item i of these_items)

why is it “set the end of” -not sure I understand the word end in there.


as these_names is a list you append the value at the end of the list.
There is also a beginning option


thanks Stefan!!!