first off i am new so i apologize for all the aweful.
i am trying to get some contacts out of now contact into a tab delimited text file - i am having a ton of problems getting this to work to a text file in text edit and i am not quite sure why???
tell application "Now Contact"
set tab to "tab"
tell document 1
set workcity to get work city of every person of selection
set uniqueid to get unique id of every person of selection
end tell
set contactinfo to workcity & tab & uniqueid
tell application "TextEdit"
activate
close every document saving no
make new document at the beginning of documents
set the name of window 1 to "Text"
set zoomed of the front window to false
set the text of the front document to contactinfo
end tell
end tell
i get the error - NSUnknownKeyScriptError
i can’t get my container “contactinfo” to set to the textedit document. but if i change the contactinfo to something like a line of text “Hello World” it will work beautifully!!
any suggestions would be awesome, i am not asking for anyone to complete the script as i would love to learn how to do this, but if you could help me with why i am getting this error it would help immensely.
thanks!
d