|
4#
楼主 |
发表于 2013-3-12 14:15:08
|
只看该作者
Dialog("ToolFrame").WinTreeView("新测试工具").Expand "EMP"
Dialog("ToolFrame").WinTreeView("新测试工具").Activate "EMP;EMP GET"
Dialog("ToolFrame").WinEditor("手机号码").SetCaretPos 0,0
Dialog("ToolFrame").WinEditor("手机号码").Type DataTable("phone", dtGlobalSheet)
Dialog("ToolFrame").WinEditor("1").SetCaretPos 0,0
Dialog("ToolFrame").WinEditor("1").Type DataTable("message", dtGlobalSheet)
Dialog("ToolFrame").WinButton("发送").Click
Dialog("ToolFrame").WinList("RPT数:").DblClick 385,51
Dialog("ToolFrame").WinList("RPT数:").Type micCtrlDwn + "c" + micCtrlUp
Dim str,splitstr
str=Dialog("ToolFrame").WinList("RPT数:").GetContent
splitstr=":"
'msgbox str
num=right(str,len(str)-instrrev(str,splitstr))
msgbox num
Dim adoConn,adoRst
Dim cnnStr,sqlStr,strName
cnnStr="rovider=sqloledb;Data Source=192.169.1.11;Initial Catalog=39empsvr2ersist Security Info=True;User ID=saassWord=Server_505"
sqlStr="select * from mt_task where convert(varchar(32) ,PtMsgID)='num'"
Set adoConn=CreateObject("adodb.connection")
adoConn.Open cnnStr
If adoConn.State=0Then
msgbox"连接失败!"
else
msgbox"连接成功!"
End If
Set adoRst=adoConn.Execute(sqlStr)
For i=0 to adoRst.Fields.Count-1
msgbox adoRst.Fields.item(i).value
Next
adoConn.Close
Set adoConn=nothing
Set adoRst=nothing
这个脚本的目的就是获取工具生成的流水号“num”自动查到该编号对应的数据进行自动有效性匹配。现在就是执行了以后会报如图错误,请大家帮忙解决。[img][img][/img][/img] |
|