Set x to clipboard as list

Hi, Hope some one out there can help! I have a list of values in a text edit file, I am trying to copy the values in it and use them as items in my variable.

This is the Textedit list:

John
Mike
Bill
Carl

Here is the script:

set thenames to {}
set thenames to the clipboard as list
get item 2 of thenames

item 2 should be “Mike” but I get an error!

pleas help!

Thank you for your time!

Brian

Hi,

the clipboard is not needed


tell application "TextEdit"
	set theNames to paragraphs of (get text of document 1)
end tell
get item 2 of theNames

Works just great thank you!