To improve reliability -- especially during times when the user is physically moving the mouse during the ControlClick -- one or both of the following may help:
1) Use SetControlDelay -1 prior to ControlClick. This avoids holding the mouse button down during the click, which in turn reduces interference from the user's physical movement of the mouse.
2) Specify the string NA anywhere in the sixth parameter (Options) as shown below:
Code:
SetControlDelay -1
ControlClick, Toolbar321, WinTitle,,,, NA
"NA" avoids marking the target window as active and avoids merging its input processing with that of the script, which may prevent physical movement of the mouse from interfering (but usually only when the target window is not active). However, this method might not work for all types of windows and controls.
If the problem with WinWaitClose persists, maybe try it with a simpler window like Notepad to ensure there really is a bug. This would also help to reproduce the issue on other PCs.
Thanks.