-1728 error with apple mail

hello folks,

after a long absence if tried to write a small script… and now I’m really afraid that I’m getting old and rusty…

I cut off all the stuff that is working fine… here is only the problem. When I try to execute this script I always get a -1728 error… but I can clearly see that there is a property called “message id” in a message…


tell application “Mail”
set theMessage to selection
set theUUID to message id of theMessage
end tell


the result of selection is always a list

tell application "Mail"
	set theMessages to selection
	if theMessages is not {} then -- check empty list
		set theUUID to message id of item 1 of theMessages
	end if
end tell

ok, I’m old and rusty…

of course it is a list…

thanks a lot