Mailbox selection

hi,

i wanted to know which folder is selected in mail.app. but i won;t able to get this information. While in entourage i would be able to get selected folder. can anybody tell me how would i get this information.

For example: i have created 1 folder test on my mac container, now i want to check wether this folder is selected or not.


tell application "Mail"
               --make new mailbox with properties {name:"test"}
		--tell mailboxes
		set theselected to the selection
		return theselected as string
		--end tell		
end tell

regards,
anni

Hi,

selection returns only the selected mails, not the folders
you can get the selected folder(s) with selected mailboxes of message viewer 1


tell application "Mail"
	--make new mailbox with properties {name:"test"}
	--tell mailboxes
	set theselected to selected mailboxes of message viewer 1
	set theName to name of item 1 of theselected
	return theName
	--end tell		
end tell