* Sample script to execute using the ScrptExec utility * * This script does the following: * - Launches Notepad. * - Types text into Notepad. * - Copies the text to the Clipboard * - Pastes the text from the Clipboard. * - Closes Notepad without saving the text to a file. Run "Notepad","",0 GoToOnError end // wait no more than 10 seconds for the Notepad window appears WaitWnd 10,"","Untitled - Notepad",1,"",0 GoToOnError end ActivateWnd "","Untitled - Notepad",1,"",0 GoToOnError end SendKeys "{{}[{(}"This text is typed by the script {^} {+} {%}"{)}]{}}{ENTER}" SendKeys "Now we will copy the above text to the Clipboard" Sleep 3 SendKeys "^{HOME}" SendKeys "+{END}" SendKeys "^c" SendKeys "^{END}{ENTER}" SendKeys "Now we will paste the text from the Clipboard{ENTER}" Sleep 3 SendKeys "^v" SendKeys "^{END}{ENTER}" SendKeys "Notepad will close soon" SendKeys "%{F4}" Sleep 3 SendKeys "%n" end: