dim arrayRet = ""
dim objExcelWorkBook = ""
dim hWeb = ""
dim sRet = ""
dim z = 0
// POP店铺导出每一个类目,每一个月份数据
hWeb = WebBrowser.BindBrowser("chrome",5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500})
objExcelWorkBook = Excel.BindBook("格式转换.xlsm")
arrayRet = Excel.ReadColumn(objExcelWorkBook,"Sheet1","c1")
// 这里,原本读取的是A1的列,但是因为字符串后面无法跟空格字符串,所以没办法,只好在Excel中实现,让他们拼接字符串到C1,这样就可以使用引用~
For Each value In arrayRet
TracePrint(value)
#icon("@res:4obbl9dd-crl6-gols-ff8b-p5udql10edbr.png")
Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"BUTTON","attrMap":{"tag":"BUTTON","type":"button","parentid":"container","aaname":" 内* "},"index":0}},"left","click",5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
#icon("@res:d16ag23q-jonh-aspe-rgm7-mqge829j9lup.png")
Mouse.Hover({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"A","attrMap":{"tag":"A","parentid":"container","aaname":"内衣 "},"index":1}},5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
#icon("@res:avn1e6qu-hn2l-ce48-es3u-9tnnjf03bs33.png")
Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"A","attrMap":{"tag":"A","parentid":"container","aaname":value},"index":1}},"left","click",5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
For i=0 To 11
#icon("@res:ajter7n0-fkkl-ai4s-1qod-b35uvkcjspe6.png")
Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"INPUT","attrMap":{"tag":"INPUT"},"index":1}},"left","click",5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
z = i+1
#icon("@res:387lr049-l9k2-bfdr-clnj-0dg6d2no53d8.png")
sRet = Text.Get({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"SPAN","attrMap":{"tag":"SPAN","parentid":"container","aaname":"内*"},"index":1}},5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"bSetForeground":true})
TracePrint(sRet)
sRet = Replace(sRet,">","-",false)
sRet = Replace(sRet,"/","-",false)
#icon("@res:4jft1q5a-jerd-gvoq-r83v-1dnnnce7djt6.png")
Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"LI","attrMap":{"tag":"LI","parentid":"graceDataPikcerPopupWrap51_*"},"index":3}},"left","click",5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
#icon("@res:k3r4gs91-d9l8-jrau-7d9i-55gqd3n2scl2.png")
Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"SPAN","attrMap":{"tag":"SPAN","parentid":"grace-datepicker-74-*-"&i},"index":0}},"left","click",5000,{"bContinueOnError":false,"iDelayAfter":1000,"iDelayBefore":1000,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
Mouse.Move(100, 365, false,{"iDelayAfter":1000,"iDelayBefore":1000})
#icon("@res:t48c0qmf-l51i-ttm2-6j6p-3r2b83t3h10r.png")
Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"SPAN","attrMap":{"tag":"SPAN","parentid":"container","aaname":"下载数据"},"index":1}},"left","click",5000,{"bContinueOnError":false,"iDelayAfter":1500,"iDelayBefore":1500,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})
#icon("@res:b7eolol7-gmnj-q5uf-i2tm-ph4bjtfln5o6.png")
Keyboard.InputText({"wnd":[{"app":"chrome","cls":"#32770","title":"另存为"},{"cls":"DUIViewWndClassName"},{"cls":"DirectUIHWND"},{"cls":"FloatNotifySink"},{"cls":"ComboBox"},{"cls":"Edit","ctrlid":1001,"aaname":"文件名:"}]},"F:\\分平台+品类+品牌--2019年度\\京东\\POP-南极人京东官方旗舰店\\"&sRet&z&"月",true,10,5000,{"bContinueOnError":false,"iDelayAfter":500,"iDelayBefore":500,"sKeyModifiers":[],"sSimulate":"uia"})
Keyboard.Press("Enter", "press", [],{"iDelayAfter":500,"iDelayBefore":500,"sSimulate":"simulate"})
Next
Next