VishnuNair Posted August 24, 2015 Posted August 24, 2015 (edited) Hello,I am new to AutoIt and am working on script which can check the outlook calendar for a given time slot and give an output if that slot is free or not. If not list the appointments.can this be done using the OutlookEX UDF? Please note i am using Outlook 2013Please let me know.Thanks,Vishnu Edited August 25, 2015 by VishnuNair
water Posted August 24, 2015 Posted August 24, 2015 Please have a look at function _OL_RecipientFreeBusyGet from the OutlookEX UDF. 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
VishnuNair Posted August 25, 2015 Author Posted August 25, 2015 (edited) Thanks Water. I will take a look at the OL_RecipientFreeBusyGet Function. Is this function intended only for the recipient or also for the sender? Meanwhile I have written a script using the OL_AppointmentGet function. I am not sure what is wrong here. The $appt never gives any value. Can you please help? While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $StartDate = GUICtrlRead($Inputdt1) $StartTime = GUICtrlRead($Inputtm1) $EndDate = GUICtrlRead($Inputdt2) $EndTime = GUICtrlRead($Inputtm2) $Appt = _OL_AppointmentGet($OOutlook, $Path, $StartDate, $StartTime) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderAccess Example Script", "Error accessing the default contacts folder. @error = " & @error) MsgBox(0x40000000, 0,'get appointment ' &$Appt) _OL_Close($oOutlook) EndSwitchWEnd Edited August 25, 2015 by VishnuNair
water Posted August 25, 2015 Posted August 25, 2015 The function returns a one based two-dimensional array. That's why MsgBox doesn't work. Use _ArrayDisplay instead. 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
water Posted August 25, 2015 Posted August 25, 2015 _OL_RecipientFreeBusyGet function. Is this function intended only for the recipient or also for the sender?Call the function for all people who should attend the meeting. Then check the results for a free time. 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
VishnuNair Posted August 25, 2015 Author Posted August 25, 2015 (edited) Thank you Water. I used the _OL_RecipientFreeBusyGet function in the following code and attached is the result. While 1 Global $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Global $StartDate = GUICtrlRead($Inputdt1) Global $StartTime = GUICtrlRead($Inputtm1) Global $EndDate = GUICtrlRead($Inputdt2) Global $EndTime = GUICtrlRead($Inputtm2) Global $Appt = _OL_RecipientFreeBusyGet($OOutlook, $Path, $StartDate, $iMinPerChar, $bCompleteFormat) MsgBox(0x40000000, 0,'get appointment ' &$Appt) _OL_Close($oOutlook) EndSwitchWEnd I am unable to interpret the results as it only gives 0's or 1's. I found that 0 character stands for Free and 1 for Tentative.My question is from what period to what period is this calculation done?Can you please help me here?Thanks,Vishnu Edited August 25, 2015 by VishnuNair edit
water Posted August 25, 2015 Posted August 25, 2015 According to the docu in the UDF:"The default is to return a string representing one month of free/busy information." 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
VishnuNair Posted August 25, 2015 Author Posted August 25, 2015 Wow!! One month that is a lot.Is there anyway i can use the same script to return the value for a specific time frame for example 26th August 2015 @ 8:00 am?Is this possible? Or use some other function?
water Posted August 25, 2015 Posted August 25, 2015 You can only specify the start date/time plus the granularity (means the number of minutes each returned character stands for).For examples please check _OL_RecipientFreeBusyGet.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
VishnuNair Posted August 25, 2015 Author Posted August 25, 2015 Thank you very much Water. I used the function and it worked fine Thank you very much..Have a great day!!
water Posted August 25, 2015 Posted August 25, 2015 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
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