B2B网站发布脚本马可波罗_发布相似产品
/* 版权声明 1.本段代码由我编写,深山的鹿博客:www.noteet.com; 2.请将PC分辨率设置为1920x1080; 3.请关闭所有会弹窗的软件,如阿里旺旺、QQ,以防干扰脚本循环运行; 4.本脚本为:“马可波罗”发布脚本,请使用搜狗浏览器“高速模式”; 5.请打开:发布相似产品,每天500条; */ Randomize //调用文件取文件名函数 Function FindAllFiles(FolderPath) Dim AllFiles,fso,Folder,f,files AllFiles = "" Set fso = CreateObject("Scripting.FileSystemObject") Set Folder = fso.getfolder(FolderPath) Set files = Folder.files For Each f In files AllFiles = AllFiles & f.name & "," Next Set fso = Nothing FindAllFiles = Split(AllFiles, ",") End Function //判断页面是否家在完成 IfColor 64, 90, "8E3638", 0 Then Delay 50 Else Delay 5000 End If //页面上移 MoveTo 22, 953 Delay 300 LeftClick 1 Delay 300 KeyPress "PageUp", 3 Delay 1000 IfColor 478, 210, "2928CC", 0 Then Delay 50 Else KeyPress "F5", 1 Delay 300 RestartScript End If //进入标题 MoveTo 779, 423 Delay 300 LeftClick 1 Delay 300 KeyDown 17, 1 KeyPress 65, 1 KeyUp 17, 1 Delay 300 //点击进入产品名称输入 //写入前除错 KeyPress "A", 1 Delay 300 KeyPress "BackSpace", 1 Delay 300 //写入标题 //写入随机地名 文件夹路径 ="F:\调用TXT\1.标题_地名" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //调用随机文档内的随机行 Text = Plugin.File.ReadFileEx(TXT路径) MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入中间词 文件夹路径 ="F:\调用TXT\1.标题_细节" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //调用随机文档内的随机行 Text = Plugin.File.ReadFileEx(TXT路径) MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入关键词 Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) //写入匹配语 Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_匹配语\屋面.txt") MyArray = Split(Text, "|") SayString MyArray(Int((UBound(MyArray) * Rnd) + 0)) Delay 300 //复制标题 KeyDown 17, 1 KeyPress 65, 1 KeyUp 17, 1 Delay 300 KeyDown 17, 1 KeyPress 67, 1 KeyUp 17, 1 Delay 300 //页面下移进入内容 MoveTo 22, 953 Delay 300 LeftClick 1 Delay 300 KeyPress "PageDown", 3 Delay 300 //进入内容 MoveTo 762, 469 Delay 300 LeftClick 1 Delay 300 KeyDown 17, 1 KeyPress 65, 1 KeyUp 17, 1 //写入内容 KeyPress "A", 1 Delay 300 KeyPress "BackSpace", 1 Delay 300 //写入企业简介 文件夹路径 ="F:\调用TXT\2.内容_简介" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //隔离段 KeyPress "Enter", 1 Delay 300 //写入句子 文件夹路径 ="F:\调用TXT\2.内容_句子" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //隔离段 KeyPress "Enter", 1 Delay 300 //写出特定段落 文件夹路径 ="F:\调用TXT\2.内容_段落\特定" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //隔离段 KeyPress "Enter", 1 Delay 300 KeyDown 17, 1 KeyPress 86, 1 KeyUp 17, 1 Delay 300 //写出内容(内带移动or删除,默认移动) 文件夹路径 ="F:\调用TXT\2.内容_段落\" FileEx = FindAllFiles(文件夹路径) If UBound(FileEx) > 0 Then 随机文件名 = FileEx(int(rnd * UBound(FileEx))) TXT路径 = 文件夹路径 + "\" + 随机文件名 发布后路径 =文件夹路径 + "\已使用\"+ 随机文件名 内容 = Plugin.File.ReadFileEx(TXT路径) SayString (Cstr(内容)) Call Plugin.File.MoveFile(TXT路径, 发布后路径) //Call Plugin.File.DeleteFile(TXT路径)//删除TXT ElseIf UBound(FileEx) < 0 Then SayString (Cstr("文件夹 < "+ 文件夹路径 +" > 内无文章!")) End If //页面下移进入内容 MoveTo 22, 953 Delay 300 LeftClick 1 Delay 300 KeyPress "PageDown", 1 Delay 300 //一键添加图片 MoveTo 1181, 550 Delay 300 LeftClick 1 Delay 300 //如果发布在指定位置就点击,不在就刷新页面重启程序 IfColor 874, 828, "1655DA", 0 Then MoveTo 874, 828 Delay 300 LeftClick 1 Delay 1500 Else MoveTo 874, 828 Delay 300 LeftClick 1 Delay 300 KeyPress "F5", 1 Delay 300 RestartScript End If MoveTo 874, 828 Delay 300 LeftClick 1 Delay 300 //如果发布颜色为灰色,等待3秒钟 IfColor 873, 812, "A7A7A7", 0 Then Delay 3000 Else Delay 50 End If //如果发布颜色为灰色,等待3秒钟 IfColor 873, 812, "A7A7A7", 0 Then Delay 3000 Else Delay 50 End If //如果产品提交成功,那么写出成功记录并点击:发布同类相似产品 IfColor 727,404, "205CF3", 0 Then s=Plugin.GetSysInfo.GetDateTime() 参数= s+" 马可波罗 发布成功1篇; " Call Plugin.File.WriteFileEx("F:\调用TXT\发布记录.txt", 参数) MoveTo 727,404 Delay 300 LeftClick 1 Delay 3000 Else Delay 5000 End If IfColor 727,404, "205CF3", 0 Then MoveTo 727,404 Delay 300 LeftClick 1 Delay 3000 Else Delay 5000 End If IfColor 727,404, "205CF3", 0 Then Delay 5000 Else Delay 50 End If