interesting. Local $sCommand = _ 'Local ' & _ '$Dummy1 = MsgBox(0,"Debug", ""), ' & _ '$Dummy2 = Sleep(500), ' & _ '$Dummy3 = WinWaitActive("Debug",""), ' & _ '$Dummy4 = ControlClick("Debug","","[CLASS:Button; TEXT:OK]"), ' & _ '$Dummy5 = Sleep(3000), ' & _ '$Dummy6 = MsgBox(0,"Debug2", "")' $sCommand = '"' & StringReplace($sCommand, '"', '""') & '"' ConsoleWrite($sCommand & @CRLF)