bobbinmp Posted April 4, 2014 Share Posted April 4, 2014 Hi Friends I have a outlook addin project. This addin create a button with the id "archivebutton" at the mail ribbon. When i click on that button, it will open a window form. I need to do this with autoit. Below is code that i have done. #include <MsgBoxConstants.au3> ;open outlook ShellExecute("OUTLOOK.EXE") WinWaitActive("Inbox") Sleep(1000) Local $archiveBtn = WinGetHandle("Inbox") MsgBox(64,"Test",$archiveBtn) Local $Btn = ControlGetHandle($archiveBtn, "", "archivebutton") ;ControlFocus($archiveBtn, "", "[NAME:archivebutton]") ControlClick($archiveBtn, "", $Btn) The above code is not working. Can any one direct me why its not working? Link to comment Share on other sites More sharing options...
water Posted April 4, 2014 Share Posted April 4, 2014 (edited) Welcome to AutoIt and the forum! Why do you need to automate the GUI? Can't you use the Outlook COM interface? Edited April 4, 2014 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bobbinmp Posted April 4, 2014 Author Share Posted April 4, 2014 I need to add the automated testing in my add in project. I already have the outlook add in project. Link to comment Share on other sites More sharing options...
water Posted April 4, 2014 Share Posted April 4, 2014 Maybe >this thread has what you are looking for. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bobbinmp Posted April 4, 2014 Author Share Posted April 4, 2014 Actually I need only to open a outlook and click on my button. Can you show me an example here. The link that u given is checked, but i didnt understand it. Link to comment Share on other sites More sharing options...
water Posted April 4, 2014 Share Posted April 4, 2014 Then you need to describe in detail what you mean by: "The above code is not working." Is Outlook started? Does the script hang or end without any processing? Etc., etc. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bobbinmp Posted April 4, 2014 Author Share Posted April 4, 2014 Yes, the above code just start the outlook and the below code will display this text "0x001003F4" MsgBox(64,"Test",$archiveBtn) Link to comment Share on other sites More sharing options...
water Posted April 4, 2014 Share Posted April 4, 2014 But what doesn't work? My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bobbinmp Posted April 4, 2014 Author Share Posted April 4, 2014 The below code is not working ControlClick($archiveBtn, "", $Btn) Link to comment Share on other sites More sharing options...
water Posted April 4, 2014 Share Posted April 4, 2014 What's the returnvalue of Controlclick? $iValue = ControlClick($archiveBtn, "", $Btn) MsgBox(0, "", $iValue) My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
bobbinmp Posted April 4, 2014 Author Share Posted April 4, 2014 The return value is showing "1" Link to comment Share on other sites More sharing options...
bobbinmp Posted April 4, 2014 Author Share Posted April 4, 2014 No one know the issue that i posted Link to comment Share on other sites More sharing options...
water Posted April 4, 2014 Share Posted April 4, 2014 You need to be patient - this isn't a 24 hours support forum. If someone has a solution he will post here. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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