Code: Select all
Outlook := ComObjActive('Outlook.Application')
Outlook.ActiveExplorer.CommandBars.ExecuteMso('ShowInConversations')
ControlClick "All mailboxes","Microsoft Outlook"
Is there any way to essentially "fork" the ExecuteMso line so the ControlClick will run without waiting for the COM action to return? Or would this require AHK_H? I'm hesitant to switch to AHK_H v2 as it is still labeled an alpha release and does not appear to be under active development.
I've also tried SetTimer for a function that calls the ControlClick function, but any timer function does not appear to run until COM has returned control to AHK. The other workaround is to run a separate AHK instance with a separate script that runs ControlClick before triggering the COM action. This seems to accomplish the task but is very clunky.
Any ideas for more elegant workarounds?