1、Uibot教程里那些坑
adodb插件 32位的用不了
domtools插件,正则替换,64位版的uibot用不了
来回折腾很费劲。
2、
Chrome调试正则字符串时用到的语法
var tem1 = document.body.text var arr1 = tem1.match("<div class=\"entry-content\">(.*?)</div><!-- .entry-content -->") var tem2 = arr1[1] 或者 var tem2 = tem1.match("<div class=\"entry-content\">(.*?)</div><!-- .entry-content -->")[1]
tem1.match(/正则表达式/) 斜杠的也是可以,但是,遇到“</div>”这样的标签需要转义字符<\/div>
3、正则表达式
/n,是用来当变量用的,正则表达式中需要变量时可以考虑它。
4、动态数组,动态二维数组
可以定义一个空数组,靠不断追加赋值,扩充其长度。push方法,好用
Dim arrayRet2 = "" Dim arrayRet3 = [] Dim YiShengCheng =[] Dim TempI = 0 arrayRet2 = File.SearchFile("C:\\Users\\Administrator\\AppData\\Local\\Temp","FH*xls",True) TracePrint(arrayRet2) For Each value In arrayRet2 sRet = Replace(value,"C:\\Users\\Administrator\\AppData\\Local\\Temp\\","",False) sRet = Replace(sRet,".xls","",False) push(YiShengCheng,[sRet]) Next objExcelWorkBook = Excel.OpenExcel("E:\\bottest\\ERP操作\\发货单.xlsx",True,"Excel","","") Excel.WriteRange(objExcelWorkBook,"Sheet2","A1",YiShengCheng,False) Excel.CloseExcel(objExcelWorkBook,True)