script.mts

来自「QTP实例源码(完整)」· MTS 代码 · 共 32 行

MTS
32
字号
Option Explicit 
'=====================================================
Dim  fso,file,filename,objTestLib,objmsgbox
'=====================================================
'create a new file system object to output information
Set objTestLib = createobject("TestLib.CLib")
'create a new sqamsgbox object
Set objmsgbox = CreateObject("SQAMsgbox.CMsgbox")
'=====================================================
'add global varibles to global sheet
DataTable.GlobalSheet.AddParameter "filename", ""
DataTable.GlobalSheet.AddParameter "UI_Flag",""
DataTable.GlobalSheet.AddParameter "Appno1", "" 
DataTable.GlobalSheet.AddParameter "Appno2", "" 
DataTable.GlobalSheet.AddParameter "Appno3", "" 
'=====================================================
'define a global file name variable
filename = "c:\log\log" & mid(date,1,2) & mid(date,4,2) & "_GenericScript_Presidio.txt"
DataTable("filename",dtGlobalSheet) = filename
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile(filename,2,True)
'=====================================================

Call objTestLib.printfile(file,3,"The beginning of all the scripts!")
objmsgbox.SQAMsgbox "We will start demo for Presidio" ,"AA Auto Test",3,0

'===========================================
Set objTestLib = nothing
Set objmsgbox = nothing
Set fso = nothing
Set file = nothing

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?