on save_names(note_names)
set pathToDocuments to (path to documents folder) as text
set pathToFolder to pathToDocuments & "Evernote:Notes:" as text
set fileName to text returned of (display dialog "Set new file name:" default answer "Content.txt")
try
set filePath to (pathToFolder & fileName) as alias
on error
tell application "System Events"
make new file at end of folder pathToFolder with properties {name:fileName}
end tell
set filePath to (pathToFolder & fileName) as alias
end try
tell application "TextWrangler"
set existFile to open filePath
set the contents of existFile to note_names
save existFile
end tell
end save_names