I’m going to sleep right now, but perhaps you might want to state what you think should happen because there are several things. You can read the AppleScriptLanguageGuide.pdf also. Some important things are how to call subroutines, how to reference objects maybe.
Earlier today, after posting the message, I found the reference manual you mentioned. I tried to find an answer to my question by searching through the manual. No luck right now. I will try some more later on today …
Anyway, what I’m trying to do is this:
I want to call this function with a string parameter containing the name of a mailbox I am looking for in Mail.app, I want the function to return that mailbox to me in such a way that I can use it like I would within that function.
Ultimately, this function will be used in an Applescript that sets out to move selected messages to an existing folder named after their respective sender. It seems several people other people have been working on similar scripts, like mchang and Aaron Swartz but they made their scripts differently from what I’m setting out to do.
As this is my first AppleScript project, I’m dealing with the problem in segments. One part get the senders address from a message, another looks up the ‘real name’ of this user in Address Book, this part is supposed to look up the folder with a name equal to the real name of that user … when I bind it all together, it will move the message to that folder.