you just had some things out of scope all the opening closing and writing of the text file must be done outside of itunes and texedit is not needed
set summaryFile to ((path to desktop as Unicode text) & "songs2.txt")
try
close access (summaryFile as alias) -- close the file if its open alreayd
end try
set ff to open for access file summaryFile with write permission
tell application "iTunes"
if player state is playing then
set sel to current track as list
else if selection is not {} then
set sel to selection
end if
set noSong to ""
repeat with this_track in sel
set the_lyrics to lyrics of this_track
set {art, nom} to {artist of this_track, name of this_track}
if the_lyrics is not "" then
tell me
set myVar to art & nom & the_lyrics
write myVar to ff starting at eof
end tell
else
beep
end if
end repeat
end tell
close access (summaryFile as alias)
mcgrailm
2010-08-05 12:22:40