lonewolf217 Posted April 14, 2008 Share Posted April 14, 2008 Today is my first time trying to script using AutoIT and I am impressed. I have some questions however about how easily I can integrate it within Outlook. I am trying to automate opening mails within Outlook for testing purposes but the only way I can figure out to do this would be to use mouse coordinates to select the area where a message will be then use mouseclick action to open it. Is there any further integration within Outlook where I can select message properties, or subjects or anything else which may help me make this a little more user friendly? I have checked with the AutoIT WindowInfo tool and unfortunetly it looks like there are no controls given for individual messages. Any help is appreciated, Thanks Link to comment Share on other sites More sharing options...
spudw2k Posted April 14, 2008 Share Posted April 14, 2008 (edited) Are you familiar with Obj/COM? You can interface with Outlook as an object. Here's a quick example on how to count unread emails.$objOutlook = ObjCreate("Outlook.Application") $objNameSpace = $objOutlook.GetNamespace("MAPI") $objNamespace.Logon("Default Outlook Profile", "", FALSE, TRUE) $objFolder = $objNamespace.GetDefaultFolder(6) Msgbox(0,"Unread Email Count",$objFolder.UnreadItemCount)http://msdn2.microsoft.com/en-us/library/a...office.11).aspxAlso search google for outlook vba scripts. VBA can be converted fairly easily to AutoIt. Edited April 14, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
junkew Posted April 14, 2008 Share Posted April 14, 2008 For outlook express1. http://www.freevbcode.com/ShowCode.asp?ID=5213 you should translate the VB code to AutoIt Code2. http://www.codeproject.com/KB/COM/EfOelibrary.aspxFor full outlook automation search in google for outlook automation object model1. set $oOutlookApplication = objCreate("outlook.application") FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
lonewolf217 Posted April 14, 2008 Author Share Posted April 14, 2008 cool! ive done a little with vbscripting as well so I will investigate further on this. thanks for the quick info Link to comment Share on other sites More sharing options...
secman Posted April 14, 2008 Share Posted April 14, 2008 Hope you don't mind but I am also looking for a script to check for outstanding e-mails. I am very new to AutoIt and have very little exposure to modern programming. The last program I wrote was in a DOS based scripting language some 15 years ago. Anyway, If you are successful would you be so kind as to post the successful part of the script that will check and display the number of unread e-mails the user logging on has, I would be very grateful. Many thanks Alan Link to comment Share on other sites More sharing options...
spudw2k Posted April 14, 2008 Share Posted April 14, 2008 ...display the number of unread e-mails the user logging on has...See the second post. Need more of an example then that? Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now