prutser Posted yesterday at 03:31 PM Posted yesterday at 03:31 PM (edited) Hi all, I have code running to strip whitespace from PNG's and put them into a PowerPoint slideshow. Until last week I used AutoIT version 3.3.16.1 with several UDF's. Last week I upgraded to 3.3.18.0 and there is something weird now. My code runs approx. 80% of the time flawless, but sometimes there is an error related to PowerPoint. Reverting back to 3.3.16.1 looks to solve the issue. Alle used UDF's are in a separate location and the same for both versions of AutoIT. The error is at random places in the code, but always in a line doing something with a PowerPoint slide. The given error is always: ==> Variable must be of type "Object".: An example of code where the error appears in 10-20% of the cases: And the error (at random places and 10-20% of the cases: What is weird in my opinion: The PPT used is always started in the beginning of the code and 100% of the time visible, so sure it's there The error show up at random places, but always with a connection to a PowerPoint object, but not consistent every time. Running the same code with the same PNG input repetitive gives 80% consistent expected results, 20% error messages on different places I seems only to happen with 3.3.18.0. I reverted back a few times from 3.3.16.1 to 3.3.18.0 and back (default installation, only change is that I choose "Edit" for the doubleclick action on a AU3 file). Running the code in 3.3.16.1 10 times gives never (knocks on wood) an error, in 3.3.18.0 in 1-2 cases out of 10. I did repeat this sequence a few times with the same results The "object" error is strange because the line in front (see code) uses the same object ... The PPT UDF is in both cases exactly the same, the Powerpoint.au3 from Toady. PowerPoint stays the same (Office 2021) en the PC used is a standard W11 Pro thing. I'm back on 3.3.16.1 right now that I used the past years. Anyway, I'm back on 3.3.16.1, but there is something strange. No hassle for me at the moment, but it looks to me there is a something changed under the hood ... Many thanks for the community for all efforts that helped me in the last 10 years! Edited yesterday at 03:53 PM by prutser Typo's
argumentum Posted yesterday at 03:47 PM Posted yesterday at 03:47 PM 8 minutes ago, prutser said: Anyway, I'm back on 3.3.16.1, but there is something strange. As you posted, all we all can say is "oh wow". To troubleshoot code, the code should be available as text, not a picture of a chunk. I don't even have PowerPoint installed not ever used, so not much help from me. If you present a simple short script that shows the trouble that can be replicated, then there is going to be a better chance to attend to it. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
prutser Posted yesterday at 04:05 PM Author Posted yesterday at 04:05 PM 8 minutes ago, argumentum said: As you posted, all we all can say is "oh wow". To troubleshoot code, the code should be available as text, not a picture of a chunk. I don't even have PowerPoint installed not ever used, so not much help from me. If you present a simple short script that shows the trouble that can be replicated, then there is going to be a better chance to attend to it. Thanks for your reply. I'm 100% sure it is not the code. And yes, I know that everybody will tell that, that's why I described extensively why I came to that conclusion. I have tested the code today approx. 50 times with 3.3.16.1 without a single failure, where 3.3.18.0 fails 9 time from another 50 times. All 100 times the used input and environment were 100% the same. The given error is not logical because the lines before the error the same object is used. My post is more intended for the AutoIT devs that something had changed in 3.3.18.0 leading to the errors.
argumentum Posted yesterday at 04:13 PM Posted yesterday at 04:13 PM 5 minutes ago, prutser said: I'm 100% sure it is not the code. I know you know is not the code. The Devs need a test bed to test their code. Running your code will show them where their code fails. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
water Posted yesterday at 04:18 PM Posted yesterday at 04:18 PM When I'm working with COM objects I ALWAYS install a COM error handler and check @error and @extended after each function call of an UDF. Toady's PPT UDF does not use a COM error handler. Often some function causes the problem in first place. If unhandled, your script will crash on another line. This is very hard to debug. I suggest to add a COM error handler to your script to get better debugging information about the line that really causes the problem. 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
prutser Posted yesterday at 04:20 PM Author Posted yesterday at 04:20 PM Fair. I will try to strip the code as much as possible, that will need some time, the code grew a little bit in the past 10 years Thanks again!
water Posted yesterday at 04:51 PM Posted yesterday at 04:51 PM Or download my PPT UDF (for download please see my signature), grab function _PPT_ErrorNotify, add it to your script and call _PPT_ErrorNotify(1) at the op of your script. You will get all COM errors written to the console. 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
prutser Posted 3 hours ago Author Posted 3 hours ago On 1/7/2026 at 5:51 PM, water said: Or download my PPT UDF (for download please see my signature), grab function _PPT_ErrorNotify, add it to your script and call _PPT_ErrorNotify(1) at the op of your script. You will get all COM errors written to the console. Great, that will be done for the next few minutes. I tried to make a look-alike script that automated runs a few 100 sheets and that 500 times, but that works fine in both versions and is not giving a clue. Will try also on another PC if that makes a difference. It should be a lot nicer if the error was more consistent, I understand that this is a needle in a haystack without some evidence that produces the error. Thanks for your time and effort in this, greatly appreciated! argumentum 1
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