Unable to see values

I have an AppleScript I am creating to operate on email messages and when I set several variable values in the script the inspector does not contain any of the variables I have set. I don’'t write scripts very often but I do not recall having this issue previously. Can anyone help me sort out why I can’t see these values?

For example:

using terms from application "Mail"
	on perform mail action with messages messageList in mailboxes mbox for rule aRule
		repeat with currentMessage in messageList
				tell currentMessage
					set {theDateReceived, theDateSent, theSender, theSubject, theSource, theReadFlag, theContent} to {the date received, the date sent, the sender, subject, the source, the read status, the content}

In the above snippet none of the variables set are available in the inspector…


Local variables used within a handler need to be declared explicitly using a local varName statement:

local theDateReceived, theDateSent, theSender, theSubject, theSource, theReadFlag, theContent

This explained in greater detail in the Script Debugger help - search for variables.

1 Like

Thanks very much!