function为1.vbs
1.vbs的脚本内容如下:
Public Function logPrint(Object)
Dim PathWay,myTime,FileName,fso, logFile
PathWay="d:\"
myTime=now( )
TimeStamp=year(myTime)&month(myTime)&day(myTime)&hour(myTime)&minute(myTime)
FileName=PathWay&TimeStamp&".bmp"
Desktop.CaptureBitmap FileName
Set fso = CreateObject("Scripting.FileSystemObject")
Set logFile = fso.OpenTextFile("d:\runtime.log", 8, True) 'Open a file and write to the end of the file and open as Unicode