07-23-2009, 07:57 PM
Function outlook_inbox_trigger
;/exe 1
typelib Outlook {00062FFF-0000-0000-C000-000000000046} 9.2
Outlook.Application a._getactive
Outlook.NameSpace ns=a.Session
Outlook.Items items=ns.GetDefaultFolder(olFolderInbox).Items
items._setevents("items_ItemsEvents")
;wait until outlook exits
a._setevents("a_ApplicationEvents_11")
opt waitmsg 1
int- t_quit
rep() 1; if(t_quit) break