david1337 Posted February 23, 2016 Share Posted February 23, 2016 Yeah checking in the users registry would be my next solution. I just wanted to check if the UDF could solve this, as that would be more reliable I guess The script is started when a user logs in (from the logon script), so it runs before the user has opened "Outlook.exe" So that won't do. Using FileExist won't do either, since the path can be different for some users. Outlook 2013 is placed in folder "Office15" etc etc. Of course I could check this or that, but again, not 100% reliable. I think that either _OL_Open in the beginning of the script, or a check in the registry will be the soloution. Again, thanks a lot for all your effort with this UDF! It is essential for my scripting! Link to comment Share on other sites More sharing options...
water Posted February 23, 2016 Author Share Posted February 23, 2016 Glad you like the UDF david1337 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
david1337 Posted February 23, 2016 Share Posted February 23, 2016 I sure do! I played around with it a little, and this seems to do the trick RegRead('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Outlook','') If @error = 1 Then MsgBox(0,"","NO OUTLOOK") Else MsgBox(0,"","OUTLOOK DETECTED") EndIf Link to comment Share on other sites More sharing options...
water Posted February 23, 2016 Author Share Posted February 23, 2016 Easy solution My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
david1337 Posted March 2, 2016 Share Posted March 2, 2016 Hi water In order to use the OutlookEX functions, "Global $oOutlook = _OL_Open()" has to set first, and "_OL_Close($oOutlook)" has to be set after. 1. But is it necessary if the application Outlook.exe itself is already running, when the OutlookEX functions are used? 2. Does "_OL_Close($oOutlook)" really have a function here, or is it unnecessary? I mean what happens if _OL_Close isn't used after an OL_Open ? Thanks David Link to comment Share on other sites More sharing options...
water Posted March 2, 2016 Author Share Posted March 2, 2016 _OL_Open is needed to start Outlook OR to connect to an already running instance. _OL_Close is needed to shutdown Outlook if started by _OL_Open. Else cleanup is being done when the script exits. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
david1337 Posted March 2, 2016 Share Posted March 2, 2016 (edited) Ah okay that clarifies it The reason I ask is because of some observations I've made. I have a script that runs with the logon script. The script itself runs for about 15 seconds, and calls an _OL_Open / _OL_Close at some point. If Outlook was already fully loaded and running when the _OL_Open is called, then no problem, Outlook keeps running, even when _OL_Close is called. If the user opens Outlook, and the _OL_Open is called DURING the load of Outlook, it will cause Outlook to close when the OL_Close is called. (I have no idea why) If I don't use _OL_Close at all, and just let the script finish, Outlook will not close, even if OL_Open is called during the load of Outlook. So that's why I was interested in knowing whether _OL_Close is needed or not. I hope it makes sense Thanks EDIT: Okay I just tried without both _OL_Open and _OL_Close, and the function still works! Even if Outlook.exe wasn't running. So now I'm just confused The OutlookEX function I am using here is _OL_MailSignatureSet. Is it because that the UDF itself calls _OL_Open and _OL_Close , and I don't have to do it in my own script? Edited March 2, 2016 by david1337 Link to comment Share on other sites More sharing options...
George-Peterson Posted March 2, 2016 Share Posted March 2, 2016 @water Hi Water, I have a problem with opening a single occurence of a recurring meeting. When I use _OL_ItemDisplay($oOL, $entryID) I always get the series opened, but i need a specific occurrence. This problem is beyond UDF EX, since all recurring meetings have the same entryID in Outlook. The one thing that is different is the Start Time of each occurrence, but the problem is that _OL_ItemDisplay requires entry id to work. My question: Is there a way to use _OL_ItemDisplay with given StartTime w/o entryID?? Thanks!! Link to comment Share on other sites More sharing options...
water Posted March 2, 2016 Author Share Posted March 2, 2016 (edited) This VB code snippet describes how it works (taken from https://msdn.microsoft.com/en-us/library/office/ff868441.aspx): Means: Grab the mast appointment item Get the recurrence information for this appointment Get a specific date form the recurrence pattern 'Access the items in the Calendar folder to locate 'the master AppointmentItem for the new series. Set myNamespace = Application.GetNamespace("MAPI") Set myFolder = myNamespace.GetDefaultFolder(olFolderCalendar) Set myItems = myFolder.Items Set myApptItem = myItems("Meet with Boss") 'Get the recurrence pattern for this appointment 'and obtain the occurrence for 3/12/03. myDate = #3/12/2003 3:00:00 PM# Set myRecurrPatt = myApptItem.GetRecurrencePattern Set myOddApptItem = myRecurrPatt.GetOccurrence(myDate) Edited March 2, 2016 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted March 2, 2016 Author Share Posted March 2, 2016 4 hours ago, david1337 said: EDIT: Okay I just tried without both _OL_Open and _OL_Close, and the function still works! Even if Outlook.exe wasn't running. So now I'm just confused The OutlookEX function I am using here is _OL_MailSignatureSet. Is it because that the UDF itself calls _OL_Open and _OL_Close , and I don't have to do it in my own script? I just checked the _OL_MailSignatur* functions. They do not use Outlook to work with the signature but the Word object My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
dean32 Posted March 6, 2016 Share Posted March 6, 2016 @Water Hi Water, I was wondering if there is a way to select calendar name when using _OL_Wrapper_CreateAppointment? Thank you for creating this UDF. Link to comment Share on other sites More sharing options...
water Posted March 6, 2016 Author Share Posted March 6, 2016 Welcome to AutoIt and the forum! I'm glad you like the UDF Unfortunately you can't specify the calender with this function. It was made to be a simple wrapper for the same function taken from the "old" Outlook UDF written by Wooltown. Grab all _OL_* functions from _OL_Wrapper_CreateAppointment and add them to your script. At the top add _OL_FolderAccess to access the needed calendar and then pass the result to _OL_ItemCreate. Example script _OL_ItemCreate.au3 should give you an idea. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
david1337 Posted March 8, 2016 Share Posted March 8, 2016 On 2/3/2016 at 3:47 PM, water said: I just checked the _OL_MailSignatur* functions. They do not use Outlook to work with the signature but the Word object Ahh okay, so.. Microsoft Word is required? Link to comment Share on other sites More sharing options...
water Posted March 8, 2016 Author Share Posted March 8, 2016 Yes, an editor is needed. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
david1337 Posted March 8, 2016 Share Posted March 8, 2016 Thanks for the info water Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted March 9, 2016 Share Posted March 9, 2016 Hi water, I'm trying to fire a Autoit function (to trigger further automation) when I recieve an email, but cannot find a function for it. Is this supported in the UDF? Thanks, -twitchy ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
water Posted March 9, 2016 Author Share Posted March 9, 2016 Yes, it is My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted March 9, 2016 Author Share Posted March 9, 2016 Check the Outlook Example Scripts thread for _OL_Example_NewMail_Event.au3 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted March 9, 2016 Share Posted March 9, 2016 12 minutes ago, water said: Check the Outlook Example Scripts thread for _OL_Example_NewMail_Event.au3 Whoa totally missed that! Thanks! Any idea where I can get a list of the other properties of the oOL_Item object? (ie: $oOL_Item.SenderName, couldnt find a list in the URL linked in the example code), or even better, is there a way to print it out in autoit (like python's dir function)? ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted March 9, 2016 Share Posted March 9, 2016 1 minute ago, twitchyliquid64 said: Whoa totally missed that! Thanks! Any idea where I can get a list of the other properties of the oOL_Item object? (ie: $oOL_Item.SenderName, couldnt find a list in the URL linked in the example code), or even better, is there a way to print it out in autoit (like python's dir function)? Think I found it unless I am mistaken? https://msdn.microsoft.com/en-us/library/bb176688(v=office.12).aspx ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search 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