Thank you Kevin. The code works when I use "active" as the trigger.
Now I'm attempting to do the same (ie attach a toolbar) for a different software. When I first start the software and run the code, I get the error "this variable not initialized" for the child window 'a'. The only way for the code to find the child window is when I manually use the "find accessible objects" from the QM toolbar. After that, the code works. But when I restart the software again, the same issue occurs.
What should I add to the code to avoid having to manually point to the child window every time?
Now I'm attempting to do the same (ie attach a toolbar) for a different software. When I first start the software and run the code, I get the error "this variable not initialized" for the child window 'a'. The only way for the code to find the child window is when I manually use the "find accessible objects" from the QM toolbar. After that, the code works. But when I restart the software again, the same issue occurs.
What should I add to the code to avoid having to manually point to the child window every time?