06-28-2011, 06:30 PM
06-28-2011, 08:54 PM
HI,
you can use the QTP in-built method "Desktop.CaptureBitmap"
Let me know if you need any help
you can use the QTP in-built method "Desktop.CaptureBitmap"
Code:
Desktop.CaptureBitmap("SampleImage.bmp",True)
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