Debugging ComObjActive()

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Beorn
Posts: 2
Joined: 04 Feb 2017, 20:08

Debugging ComObjActive()

13 Dec 2018, 17:09

I have an AHK script that interacts with PowerPoint via a COM object. For instance, this takes the current selection and aligns objects by their centers:

Code: Select all

ppt := ComObjActive("PowerPoint.Application")
ppt.ActiveWindow.Selection.ShapeRange.Align(1)
(The real script is far more complicated, but this is the gist.)

I have a user who just installed a Windows update last night, and now cannot do anything that requires a PPT COM object interaction. This was all working properly before the OS update.

I'm trying to figure out how to debug this, as I cannot replicate the issue on my development machines. The current code is all contained in try/catch blocks. What sort of error message should I expect A_LastError to contain if ComObjActive() fails? Is that the right way to go?

Any help would be greatly appreciated!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RandomBoy, scriptor2016 and 358 guests