; This is a demonstration for Communicating with other Windows. #cs This include is not requred, as no GUI's are needed. #include #ce ; Wait time after each action - mili-seconds. $Wait = 5500 ; 5.5 seconds ; First we will open notepad. Sleep($Wait) Run("Notepad.exe") WinWaitActive("Untitled -") $variable = '; Wait until the window is active.' Send($variable & @CRLF) $variable = '; @CRLF - Carriage Return Line Feed, so everything is not on one line.' Send($variable & @CRLF) Sleep($Wait) $variable = '; Lets use the Window Handle for controlling Notepad.' Send($variable & @CRLF) Sleep($Wait) $Note_win = WinGetHandle("Untitled -", "") $variable = '; Resize the Notepad window, and move it, see help for details.' Send($variable & @CRLF) Sleep($Wait) WinMove($Note_win, "", 500, 200, 300, 350) $variable = '; Important, The Send Command Only works with the active windows focused control.' Send($variable & @CRLF) Sleep($Wait) $variable = '; Now for some Control keys.' Send($variable & @CRLF) Sleep($Wait) $variable = '; Lets copy all the text, cut, and paste it back. Alt-E-A, Alt-E-T, Ctrl-V ' Send($variable & @CRLF) Send("!EA") Sleep($Wait) Send("!ET") Sleep($Wait) Send("^V") $variable = '; Now lets Close the Notepad. Alt-F-X, Right, and Enter' Send($variable & @CRLF) Sleep($Wait) Send("!FX") Sleep($Wait) Send("{RIGHT}") Sleep($Wait) Send("{ENTER}") ; there is no GUI or loop in this Demo. Exit