This function returns the index in the MAPI message list of the message that caused the last trigger. If you created an event that triggers when an E-mail is received, then you can run a script as the action to the event. In the script, you call this function to get the index for the message that caused the trigger. You can now examine the message to take more action.
Return value: index
Description: This is the index of the E-mail message that was last received.
' this script will access the E-mail message that caused this event to trigger
' it will then speak the subject line of the message
index = hs.MailTrigger
subject = hs.MailSubject(index)
hs.speak "You have mail! The subject is "