这段脚本从今天上午十点就开始写了,一直写到现在两个多小时。也是通用脚本,因为企汇网也不需要选择分类,脚本并不复杂,但企汇网敏感词实在太多,发布成功率比较低。

/*
版权声明 
1.本段代码由我编写,深山的鹿博客:www.noteet.com;
2.请将PC分辨率设置为1920x1080;
3.请关闭所有会弹窗的软件,如阿里旺旺、QQ,以防干扰脚本循环运行;
4.本脚本为:“企汇网”发布脚本,请使用搜狗浏览器“高速模式”;
5.请打开:发布产品信息,每天3条。
*/
//调用文件取文件名函数
//调用文件取文件名函数
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
Do
    IfColor 59, 93, "F9EEE4", 0 Then
        Exit Do
    Else 
        Delay 3000
    End If
Loop
//页面上移
MoveTo 32, 984
Delay 300
LeftClick 1
Delay 500
KeyPress "PageUp",3
Delay 500
//点击发布产品信息
MoveTo 462, 239
Delay 300
LeftClick 1
Delay 300
//等待
Do
    IfColor 59, 93, "F9EEE4", 0 Then
        Exit Do
    Else 
        Delay 3000
    End If
Loop
//如果有提示点击关闭
IfColor 1426,222, "FFFFFF", 0 Then
    MoveTo 1426,222
    Delay 300
    LeftClick 1
    Delay 300
Else 
    Delay 50
End If
//如果颜色正确进入下一步
Do
    IfColor 699,315 ,"1717D0",0 Then
        Exit Do
    Else 
        Delay 3000
    End If
Loop
//点击进入标题输入
MoveTo 789, 355
Delay 300
LeftClick 1
Delay 300
//输入标题
//点击进入产品名称输入
//写入前除错
KeyPress "A", 1
Delay 300
KeyPress "BackSpace", 1
Delay 300
//写入标题
//写入首端着关键词
Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt")
MyArray = Split(Text, "|")
SayString MyArray(Int((UBound(MyArray) * Rnd) + 0))
SayString "_"
//写入随机地名
文件夹路径 ="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
//Tab1次输入关键词
KeyPress "Tab", 1
Delay 300
//写入关键词
Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt")
MyArray = Split(Text, "|")
SayString MyArray(Int((UBound(MyArray) * Rnd) + 0))
//Tab1次输入关键词
KeyPress "Tab", 1
Delay 300
//写入关键词
Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt")
MyArray = Split(Text, "|")
SayString MyArray(Int((UBound(MyArray) * Rnd) + 0))
//Tab1次输入关键词
KeyPress "Tab", 1
Delay 300
//写入关键词
Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_关键词\屋面.txt")
MyArray = Split(Text, "|")
SayString MyArray(Int((UBound(MyArray) * Rnd) + 0))
Delay 1000
//点击插入图片
MoveTo 780, 987
Delay 300
LeftClick 1
//判断图片页面是否加载
do
    IfColor 751,332, "FFFFFF", 0 Then
        Delay 1000
        Exit Do
    Else 
        Delay 2000
    End If
loop
//点击图片
MoveTo 748, 271
Delay 300
LeftClick 1
Delay 300
//等待图片出现
do
    IfColor 748,629 , "FFFFFF", 0 Then
        Delay 300
        Exit Do
    Else 
        Delay 1000
    End If
Loop
//点击确定
MoveTo 923, 678
Delay 300
LeftClick 1
Delay 800
//点击页面下移
MoveTo 32, 984
Delay 300
LeftClick 1
Delay 500
KeyPress "PageDown", 1
Delay 300
KeyPress "PageDown", 1
Delay 300
//点击内容
MoveTo 861, 324
Delay 300
LeftClick 1
Delay 500
//除错代码
LeftClick 1
Delay 300
KeyPress "A", 1
Delay 500
KeyPress "BackSpace", 1
Delay 300
//写入标题
//写入首端着重语
SayString "屋顶_"
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))
//隔离段
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
//写出内容(内带移动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 32, 984
Delay 300
LeftClick 1
Delay 500
KeyPress "PageDown", 1
Delay 300
KeyPress "PageDown", 1
Delay 300
//点击输入品牌
MoveTo 797, 707
Delay 300
LeftClick 1
Delay 300
Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_细节\品牌.txt")
MyArray = Split(Text, "|")
SayString MyArray(Int((UBound(MyArray) * Rnd) + 0))
//Tab输入型号
KeyPress "Tab", 1
Delay 300
Text = Plugin.File.ReadFileEx("F:\调用TXT\1.标题_细节\型号.txt")
MyArray = Split(Text, "|")
SayString MyArray(Int((UBound(MyArray) * Rnd) + 0))
//Tab输入价格
KeyPress "Tab", 1
Delay 300
SayString "135"
Delay 300
//Tab输入供应总量
KeyPress "Tab", 1
Delay 300
SayString "99999"
Delay 300
//Tab输入最小起总量
KeyPress "Tab", 1
Delay 300
SayString "1000"
Delay 300
//Tab输入最小起总量
KeyPress "Tab", 1
Delay 300
SayString "平方米"
Delay 300
//点击确定
MoveTo 780, 971
Delay 300
LeftClick 1
Delay 3000
//除错
Do
    IfColor 938, 502, "E09813", 0 Then
        Delay 500
        KeyPress "F5", 1
        Exit Do
    Else 
        Delay 8000
        KeyPress "F5", 1
        Exit Do
    End If
    IfColor 918, 342, "B20D", 0 Then
        s=Plugin.GetSysInfo.GetDateTime()    
        参数=  s+" 企汇网 发布成功1篇;   " 
        Call Plugin.File.WriteFileEx("F:\调用TXT\发布记录.txt", 参数)
        KeyPress "F5", 1
        Exit Do
    Else 
        Delay 8000
        KeyPress "F5", 1
        Exit Do
    End If
Loop
KeyPress "F5", 1