water Posted January 24, 2017 Author Posted January 24, 2017 If you run this version of the script you should find log file "MailSignature.txt" in "C:\temp". it should look like: Quote 2017/01/24 15:00:19 AutoIt: 3.3.12.0, AdminMode, OS: WIN_7/SP1/X64, OSLang: 0407, Script: H:\tools\AutoIt3\OutlookEX\Test\test2.au3 2017/01/24 15:00:51 @@ DEBUG COM Error encountered in test2.au3 (4374) : Number = 0x80020009 (-2147352567) WinDescription = Ausnahmefehler aufgetreten. Description = Source = HelpFile = HelpContext = 0 LastDllError = 0 Retcode = 0x80004002 2017/01/24 15:00:51 @error: 3, @extended: 6 #include "..\OutlookEX.au3" #include <Debug.au3> #RequireAdmin _DebugSetup(Default, True, 4, "C:\Temp\MailSignature.txt", True) _DebugCOMError() _OL_MailSignatureSet("NameOfSig", "NameOfSig") _DebugOut("@error: " & @error & ", @extended: " & @extended) 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
david1337 Posted January 24, 2017 Posted January 24, 2017 (edited) I only got this: 2017/01/24 15:14:25 AutoIt: 3.3.14.2, AdminMode, OS: WIN_10/X64, OSLang: 0409, Keyboard: 00000406, Script: C:\Testing\Test1.au3 From the compiled version I got: 2017/01/24 15:11:02 COM Error encountered in Test1.exe () : Number = 0x00000000 () WinDescription = Description = Source = HelpFile = HelpContext = LastDllError = Retcode = 0x00000000 2017/01/24 15:11:02 @error: 3, @extended: 6 Edited January 24, 2017 by david1337
water Posted January 24, 2017 Author Posted January 24, 2017 That's the expected result! Fine! It seems that some Windows setting do not allow the script to write to the screen when run as admin? 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
david1337 Posted January 24, 2017 Posted January 24, 2017 (edited) Hmm yeah it seems like it. Weird? Did you see my post #620 ? Edited January 24, 2017 by david1337
water Posted January 24, 2017 Author Posted January 24, 2017 Strange. Don't understand why it crashes. Is this a situation you need to handle properly? Means: Return an error instead of crashing. 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
david1337 Posted January 24, 2017 Posted January 24, 2017 (edited) Yeah I would very much like to avoid ANY error message from the UDF. If the _OL_MailSignatureSet fails, no matter what the reason, I just want it to write in the log, and then skip the _OL_MailSignatureSet part. Btw I hope you know that I appreciate all your time Something like: #include <OutlookEX.au3> _OL_MailSignatureSet("Sig", "Sig") If @error Then FileWrite("C:\temp2\ErrorLog.txt","@error: " & @error & @CRLF & "@extended: " & @extended) EndIf Edited January 24, 2017 by david1337
water Posted January 24, 2017 Author Posted January 24, 2017 I started Outlook as Administrator and removed #RequireAdmin from the script. I get the expected result: @error = 3, @extended = 6. Weird 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
david1337 Posted January 25, 2017 Posted January 25, 2017 (edited) Yeah it's so weird that you can avoid the crash with the line error, and I can't. I have even tested on different machines/servers. Are you testing with compiled script? Edited January 25, 2017 by david1337
water Posted January 25, 2017 Author Posted January 25, 2017 Exactly. 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
david1337 Posted January 25, 2017 Posted January 25, 2017 I think that I will leave that for now Can you think of any other case where the _OL_MailSignatureSet could make the script crash, which may be fixed after the new edited _OL_MailSignatureSet and _OL_MailSignatureGet functions?
water Posted January 25, 2017 Author Posted January 25, 2017 As I have extended the COM error handling I can't think of a situation that still could crash your script. But never say never 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
david1337 Posted January 25, 2017 Posted January 25, 2017 (edited) Yeah that is awesome! What I meant was, can you think of any other situation EXCEPT this admin rights thing, that could crash the script before you extended the COM error handling? Edited January 25, 2017 by david1337
water Posted January 25, 2017 Author Posted January 25, 2017 No. If it still crashes (index error in array handling etc.) then it's a bug and needs to be fixed by me 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
Clown007_de Posted January 25, 2017 Posted January 25, 2017 (edited) I found a small "Bug"? in the function _OL_FolderTree. If the folder name includes special character like ‘\’, “/” the udf gives this information back: / = %2F, \=%5C. After the _OL_FolderTree i need this information for _OL_ItemFind. But this function don't work with this %2f. After a litle search i found out this is html encoding. So it's easy to decode Edited January 25, 2017 by Clown007_de
water Posted January 25, 2017 Author Posted January 25, 2017 Will check as soon as I return to my Office. 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
bon3o Posted January 25, 2017 Posted January 25, 2017 Sorry for being annoying but i have a feeling that my post #618 wasn`t marked) Can i please ask you to help me?
water Posted January 25, 2017 Author Posted January 25, 2017 At the moment there is no ready-made function to do what you want. I will do some tests as soon as I return to my Office. 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
david1337 Posted January 26, 2017 Posted January 26, 2017 Hi water Okay I just found another situation where _OL_MailSignatureSet causes a crash. If a user does not have an Outlook profile set up, and the _OL_MailSignatureSet function is called, then this menu will pop up: If user clicks "Cancel", then the script will crash with "Line error xxxxxxx" I guess this is because _OL_MailSignatureGet cannot get in contact with Outlook. The new error handling should have taken care of this? _OL_MailSignatureSet("name", "name") If @error Then FileWrite(@ScriptDir & "\ErrorLog.txt","@error: " & @error & @CRLF & "@extended: " & @extended) EndIf (Your 2 new functions are included in the OutlookEX UDF)
david1337 Posted January 26, 2017 Posted January 26, 2017 And to be more specific, this is the line that causes the crash: Local $sNewMessageSig = $oSignatureObject.NewMessageSignature (The requested action with this object has failed.) And this error check just below that line, must be the one that fails to do it's job: If @error Then Return SetError(6, @error, "")
water Posted January 26, 2017 Author Posted January 26, 2017 Thanks for reporting this problem. Will check as soon as I return to my office. 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