由于CQ单号是在路径中所以需要在路径中获取,主要就是对字符串操作,涉及vbs的操作函数为Split(截取字符串)和StrComp(字符串比较)。
-
rem 获取CQ单号,为界面工具的参数
-
Function runPyUI( filename )
-
dim splitnmstr
-
splitnmstr = Split(filename ,"itnm",-1,1)
-
ret = StrComp(filename ,splitnmstr(0),1)
-
rem msgbox ret
-
if ret <> 0 then
-
dim spludlinestr
-
spludlinestr = Split(splitnmstr(1),"_",-1,1)
-
if cq_num = "" then
-
cq_num = spludlinestr(0)
-
rem msgbox cq_num
-
rem 调用界面工具,cq_num为参数
-
exeFolder = strFolder + "\exe\main.exe"
-
rem msgbox exeFolder
-
objShell.run exeFolder,1,true
-
end if
-
end if
-
End Function
参考资料:
http://blog.chinaunix.net/uid-24917554-id-3146622.html
阅读(1612) | 评论(0) | 转发(0) |