51Testing软件测试论坛
标题:
如何在vbs中实现屏幕捕捉?
[打印本页]
作者:
overn
时间:
2007-12-26 23:41
标题:
如何在vbs中实现屏幕捕捉?
如题,谢谢!
注:使用模拟键盘PrtSc键,然后在“画图”中模拟Ctrl+V得不到屏幕图像。
作者:
gy21st
时间:
2007-12-27 08:24
CaptureBitmap Method
Description
Saves a screen capture of the object as a .png or .bmp image, depending on the specified file extension.
Syntax
object.CaptureBitmap Filename, [OverrideExisting]
作者:
yuandjing
时间:
2007-12-27 17:39
'捕获当前屏幕(截图)
Public Function QTP_Capture(pathway)
Dim datestamp
Dim filename
datestamp = Now()
filename = Environment("TestName")&"_"&datestamp&".png"
filename = Replace(filename,"/","")
filename = Replace(filename,":","")
filename = pathway + "\" + ""&filename
Desktop.CaptureBitmap filename
End Function
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2