07-11-2011, 10:51 AM
try the follwing in .vbs file......
Code:
Set oWordBasic = CreateObject("Word.Basic")
oWordBasic.SendKeys "{prtsc}"
oWordBasic.AppClose "Microsoft Word"
Set oWordBasic = Nothing
WScript.Sleep 2000
set WshShell = CreateObject("WScript.Shell")
WshShell.Run "mspaint"
WScript.Sleep 2000
set shl=createobject("shell.application")
shl.MinimizeAll
WScript.Sleep 1000
shl.UndoMinimizeAll
Set shl=Nothing
WScript.Sleep 1000
WshShell.AppActivate "untitled - Paint"
WScript.Sleep 1000
WshShell.SendKeys "^v"
WScript.Sleep 500
WshShell.SendKeys "^s"
WScript.Sleep 500
WshShell.SendKeys "c:\scrnshot.jpeg"
WScript.Sleep 500
WshShell.SendKeys "{ENTER}", True
Set WshShell=Nothing
WScript.Quit