#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Add_Constants=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include 'WaitForControls.au3' #include 'log4a.au3' #Region ;**** Logging **** ; Enable logging and don't write to stderr _log4a_SetEnable() ; Write to stderr, set min level to warn, customize message format _log4a_SetErrorStream() _log4a_SetMinLevel($LOG4A_LEVEL_INFO) ; If @compiled Then _log4a_SetMinLevel($LOG4A_LEVEL_WARN) ; Change the min level if the script is compiled _log4a_SetFormat("${date} | ${host} | ${level} | ${message}") #EndRegion ;**** Logging **** Run('c:\windows\system32\mstsc.exe') $handle = WinGetHandle('mstsc.exe') _checkClickCtrl('[CLASS:#32770]', 'Remote Desktop Connection', '[CLASS:Button; INSTANCE:5]', 'Co&nnect', 0, 500) ;~ ControlClick('Windows Security', '', '[CLASS:Button; INSTANCE:2]') _checkClickCtrl('Windows Security', 'Windows Security', '[CLASS:Button; INSTANCE:2]', 'OK', 5000) _checkClickCtrl('[CLASS:#32770]', 'Remote Desktop Connection', '[CLASS:Button; INSTANCE:5]', '&Yes')