29 maj 2008

Uruchomienie i zamknięcie notatnika, notepad

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("Notepad")
Wscript.Sleep 3000

WshShell.AppActivate("Bez tytułu - Notepad")
WshShell.SendKeys("Dodanie tekstu po 3 sekundach")
WScript.Sleep 3000
WshShell.SendKeys "%{F4}"
Set WshShell = Nothing
WScript.Quit 0