I have the following code sample: AutoItX3 autIt = new AutoItX3(); autIt.AutoItSetOption("WinTitleMatchMode", 2); autIt.Sleep(500); autIt.WinWait("MyTitle", "", 0); This works perfectly if I execute this code in an own thread. But if I execute from within the WindowMessage thread (for example within the button click event) it does not find the dialog with MyTitle. Ok I have a workaround - just start by a thread. But then I have another issue. I want to log the AutoIt executions on to my gui. So within the thread a I have to do a BeginInvoke and assign the log text to the control which shows the log. After the BeginInvoke call I have trouble again with AutoItX3. AutoItX3 autIt = new AutoItX3(); autIt.AutoItSetOption("WinTitleMatchMode", 2); MyTextBox.BeginInvoke(new SetMyTextDelegate(SetMyText), "Click OK"); autIt.Sleep(500); autIt.WinWait("MyTitle", "", 0); autIt.WinActivate("MyTitle"); autIt.Sleep(500); string result = autIt.ControlCommand("MyTitle", "", "[TEXT:&OK]", "IsEnabled", ""); Without the BeginInvoke call result is "1" with the call it is "0". My OS: Windows 7 64-Bit. Do you have any ideas how to solve this problem? Thank you!