I'm trying to get started with events but I'm having a rough time figuring out. I want to create a code such that, anytime the autohotkey script is running, I am able to retrieve the contents of an email that I have just sent and perform actions once the email is sent.
This is what I have so far, though I am sure it's quite incorrect, especially as it isn't working:
Code: Select all
#Persistent
Outlook := ComObjActive("Outlook.Application")
Email := Outlook.Application.ActiveInspector.CurrentItem
ComObjConnect(Email, "Email_")
Email_Send()
{
Email_To := Email.To
Email_Subject := Email.Subject
MsgBox, %Email_To%`n%Email_Subject%
}
Thanks so much for any help you can provide!