With some guidance from the said topic, I managed to construct this piece of code in AHK v2 which theoretically should launch Microsoft To Do.
Code: Select all
#Requires AutoHotkey v2.0
IApplicationActivationManager := ComObject("{45BA127D-10A8-46EA-8AB7-56EA9078943C}", "{2e941141-7f97-4756-ba1d-9decde894a3d}")
DllCall(NumGet(NumGet(IApplicationActivationManager+0, "UPtr")+3*A_PtrSize, "UPtr"), "Ptr", IApplicationActivationManager, "Str", "Microsoft.Todos_8wekyb3d8bbwe!App", "Str", 0, "UInt", 0, "IntP", processId)
ObjRelease(IApplicationActivationManager)
Unfortunately, it doesn't work and all I get is this unfamiliar error:
Although the warning tells me that the error was thrown from line 4 (in the DllCall()). This is a bit new to me so can someone please explain what could have caused the error?Error: Expected a Number but got a ComValue.