Set Excelapp=CreateObject("Excel.Application")
ExcelApp.Workbooks.App
ExcelApp.Visible=True
Set CreatExcel=ExcelApp
End Function
Function PutValueInfile(sfilePath,ishee,irow,icolumn,value)
Set ExcelObj=CreateObject("Excel.Application")
ExcelObj.Workbooks.Open sfilePath
Set NewSheet=ExcelObject.Sheet.Item(isheet)
NewSheet.Cells(irow,icolumn)=value
ExcelObj.Application.Quit
Set ExcelObj=Nothing
GetValueInFile=value
End Function
Function MemoryCollection(T1,T2,Processname,sfilename)
Set ExcelObj=CreateObject("Excel.Application")
ExcelObj.workbooks.Open sfilename
Set NewSheet=ExcelObj.Sheets.Item(3)
Set oShell = CreateObject("WSCript.shell")
oShell.run"Taskmgr.exe"
Dialog("regexpwndtitle:=Windows 任务管理器").Minimize
For i=1 to T1
Memory = Dialog("nativeclass:=#32770","regexpwndtitle:=windows 任务管理器","text:=windows 任务管理器").Winlistview("regexpwndclass:=Syslistview32","window id:=1009").GetSubItem(Processname,"内存使用")
value=date&"_"&Time&":"&ProcessName&"内存使用情况:"&NewSheet.cells(i+1,1)=value
wait T2
Next
Set oShell=Nothing
ExcelObj.ActiveWorkbook.Save
ExcelObj.Application.Quit
Set ExcelObj=Nothing
Dialog("regexpwndtitle:=Windows 任务管理器").Close
End Function