按键精灵脚本之阿里国际站发布产品智能版


分享个人操作阿里巴巴国际站多年的按键精灵脚本,直到现在都在使用。

本脚适合有按键精灵基础或学习者使用。脚本没有写适配分辨率,使用者需要修改分辨率,并重新抓图

阿里国际站发布产品脚本经过多次改版才完善起来。阿里后台一直改版,脚本也要根据后台变动进行修改,建议有按键基础者学习使用。

发布产品脚本有三个版本:

发布产品银行版:此版本通过发布类似产品通过图片银行读取产品主图,并在详情页写入标题。(很少用了,阿里详情插不插标题都不影响优化)

发布产品智能版:此版本通过发布类似产品通过图片银行读取产品主图。(常用版)

发布产品桌面版:此版本通过发布类似产品通过桌面上传图片。(很少使用,上传图片太慢)

自我介绍:
本人现在做手机配件,脚本有修改产品属性部分,如果你不需要修改属性哪么脚本上进行跳过就可以了,脚本和表格都是按手机配件做为案例,具体请根据自己产品进行修改。

脚本介绍:
批量发布阿里类似产品。脚本主要是通过读取excel表格进行发布类似产品,在发布前先准备好excel表格内容。
发布类似产品主要是修改:标题,关键词,属性,图片

表格制作:
在表格制作好发布信息:标题,关键词,图片名称(6张),属性(适用品牌),类似产品地址。(按键发布时从第一行开始读取)

类似产品:

优化好一个产品,进行发布类似产品。发布时可以按型号,款式,功能等做好表格进行发布类似产品,具体自己自行发挥。

表格读取地址:
在脚本18行修改成自己表格地址(红色部分):Call Plugin.Office.OpenXls(“F:\工作\资料\按键发布表格\iphone.xlsx“)

浏览器:
使用默认浏览器进行发布,推荐使用360安全浏览器并设置为默认浏览器(其它浏览器也行,个人使用习惯)。

脚本(智能版,本脚本也包括了银行版,但我设置了跳过详情,需要的删除跳过可换成银行版):

guanjiancijsq = 1
fabujsq = 1
fabushumu = 20000
Dim keyword
Dim productname
Dim picturename1
Dim picturename2
Dim picturename3
Dim picturename4
Dim picturename5
Dim picturename6
Dim picturename7
Dim web
While i = 0
    Call 发布程序
Wend
Sub 发布程序
Call Plugin.Office.OpenXls("F:\工作\资料\按键发布表格\iphone.xlsx")
productname = Plugin.Office.ReadXls(1, guanjiancijsq, 1)
keyword = Plugin.Office.ReadXls(1, guanjiancijsq, 2)
picturename1 = Plugin.Office.ReadXls(1, guanjiancijsq, 3)
picturename2 = Plugin.Office.ReadXls(1, guanjiancijsq, 4)
picturename3 = Plugin.Office.ReadXls(1, guanjiancijsq, 5)
picturename4 = Plugin.Office.ReadXls(1, guanjiancijsq, 6)
picturename5 = Plugin.Office.ReadXls(1, guanjiancijsq, 7)
picturename6 = Plugin.Office.ReadXls(1, guanjiancijsq, 8)
picturename7 = Plugin.Office.ReadXls(1, guanjiancijsq, 9)
web = Plugin.Office.ReadXls(1, guanjiancijsq, 10)
Call Plugin.Office.CloseXls()
Delay 1000
RunApp web
Delay 3000
    While 1
FindPic 0,0,1920,1080,"Attachment:\基本信息.bmp",0.9,jbxxX,jbxxY
If jbxxX > 0 And jbxxY > 0 Then
MoveTo jbxxx+30, jbxxy+5
    LeftClick 1
    Delay 1000
            Goto 开始
            Else
        Delay 500
End If
        Wend
    Rem 开始
//填写关键词
FindPic 0,0,1920,1080,"Attachment:\关键词.bmp",0.9,gjcX,gjcY
If gjcX > 0 And gjcY > 0 Then
    MoveTo gjcx+180, gjcy+10
    LeftClick 1
    KeyDown 17, 1
    KeyPress 65, 1
    KeyUp 17, 1
    KeyPress "BackSpace", 1
End If
Call Plugin.Sys.SetCLB(keyword)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
//填写产品名称
FindPic 0,0,1920,1080,"Attachment:\产品名称.bmp",0.9,cpX,cpY
If cpX > 0 And cpY > 0 Then
    MoveTo cpx+180, cpy+10
    LeftClick 1
    KeyDown 17, 1
    KeyPress 65, 1
    KeyUp 17, 1
    KeyPress "BackSpace", 1
End If
Call Plugin.Sys.SetCLB(productname)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 500
//适用品牌
FindPic 0,0,1920,1080,"Attachment:\适用品牌.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
MoveTo intx+400, inty+10
        LeftClick 1
        KeyDown 17, 1
        KeyPress 65, 1
        KeyUp 17, 1
        KeyPress "BackSpace", 1
End If
Call Plugin.Sys.SetCLB(picturename7)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 500
    Rem 跳过
//型号
FindPic 0,0,1920,1080,"Attachment:\型号.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then 
MoveTo intx+100, inty+10
        LeftClick 1
        KeyDown 17, 1
        KeyPress 65, 1
        KeyUp 17, 1
        KeyPress "BackSpace", 1
End If
Call Plugin.Sys.SetCLB(keyword)
    KeyDown 17, 1
    KeyPress 86, 1
    KeyUp 17, 1
Delay 500
FindPic 0,0,1920,1080,"Attachment:\属性值.bmp",0.9,sxzX,sxzY
If sxzX > 0 And sxzY > 0 Then
MoveTo sxzx+380, sxzy+10
    Delay 500
    LeftClick 1
    KeyDown 17, 1
    KeyPress 65, 1
    KeyUp 17, 1
    KeyPress "BackSpace", 1
        Delay 100
    Call Plugin.Sys.SetCLB(keyword)
    KeyDown 17, 1
    KeyPress 86, 1
    KeyUp 17, 1
    Delay 200
End If
//产品详情
FindPic 0,0,1920,1080,"Attachment:\产品详情.bmp",0.9,cpxqX,cpxqY
If cpxqX > 0 And cpxqY > 0 Then
MoveTo cpxqX, cpxqy
    LeftClick 1
    Delay 500
End If
//上传图片
FindPic 0,0,1920,1080,"Attachment:\图片银行.bmp",0.9,TPYHX,TPYHY
If TPYHX > 0 And TPYHY > 0 Then
MoveTo TPYHX+15, TPYHY+3
    LeftClick 1
    Delay 500
End If
//弹出图片银行
//上传图片1
While 1
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx-50, cpfzy+10
        LeftClick 1
            KeyDown 17, 1
            KeyPress 65, 1
            KeyUp 17, 1
            KeyPress "BackSpace", 1
        Goto 输入图片名1
    Else 
    Delay 500
End If
    Wend
Rem 输入图片名1
Call Plugin.Sys.SetCLB(picturename1)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,ssX,ssY
If ssX > 0 And ssY > 0 Then
MoveTo ssx, ssy
    LeftClick 2
End If
Delay 500
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,yyX,yyY
If yyX > 0 And yyY > 0 Then
MoveTo yyx-155, yyy+65
    LeftClick 1
End If
Delay 500
//上传图片2
While 1
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx-50, cpfzy+10
        LeftClick 1
            KeyDown 17, 1
            KeyPress 65, 1
            KeyUp 17, 1
            KeyPress "BackSpace", 1
        Goto 输入图片名2
    Else 
    Delay 500
End If
    Wend
Rem 输入图片名2
Call Plugin.Sys.SetCLB(picturename2)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,ssX,ssY
If ssX > 0 And ssY > 0 Then
MoveTo ssx, ssy
    LeftClick 2
End If
Delay 500
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,yyX,yyY
If yyX > 0 And yyY > 0 Then
MoveTo yyx-155, yyy+65
    LeftClick 1
End If
Delay 500
//上传图片3
While 1
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx-50, cpfzy+10
        LeftClick 1
            KeyDown 17, 1
            KeyPress 65, 1
            KeyUp 17, 1
            KeyPress "BackSpace", 1
        Goto 输入图片名3
    Else 
    Delay 500
End If
    Wend
Rem 输入图片名3
Call Plugin.Sys.SetCLB(picturename3)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,ssX,ssY
If ssX > 0 And ssY > 0 Then
MoveTo ssx, ssy
    LeftClick 2
End If
Delay 500
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,yyX,yyY
If yyX > 0 And yyY > 0 Then
MoveTo yyx-155, yyy+65
    LeftClick 1
End If
Delay 500
//上传图片4
While 1
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx-50, cpfzy+10
        LeftClick 1
            KeyDown 17, 1
            KeyPress 65, 1
            KeyUp 17, 1
            KeyPress "BackSpace", 1
        Goto 输入图片名4
    Else 
    Delay 500
End If
    Wend
Rem 输入图片名4
Call Plugin.Sys.SetCLB(picturename4)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,ssX,ssY
If ssX > 0 And ssY > 0 Then
MoveTo ssx, ssy
    LeftClick 2
End If
Delay 500
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,yyX,yyY
If yyX > 0 And yyY > 0 Then
MoveTo yyx-155, yyy+65
    LeftClick 1
End If
Delay 500
//上传图片5
While 1
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx-50, cpfzy+10
        LeftClick 1
            KeyDown 17, 1
            KeyPress 65, 1
            KeyUp 17, 1
            KeyPress "BackSpace", 1
        Goto 输入图片名5
    Else 
    Delay 500
End If
    Wend
Rem 输入图片名5
Call Plugin.Sys.SetCLB(picturename5)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,ssX,ssY
If ssX > 0 And ssY > 0 Then
MoveTo ssx, ssy
    LeftClick 2
End If
Delay 500
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,yyX,yyY
If yyX > 0 And yyY > 0 Then
MoveTo yyx-155, yyy+65
    LeftClick 1
End If
Delay 500
//上传图片6
While 1
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx-50, cpfzy+10
        LeftClick 1
            KeyDown 17, 1
            KeyPress 65, 1
            KeyUp 17, 1
            KeyPress "BackSpace", 1
        Goto 输入图片名6
    Else 
    Delay 500
End If
    Wend
Rem 输入图片名6
Call Plugin.Sys.SetCLB(picturename6)
KeyDown 17, 1
KeyPress 86, 1
KeyUp 17, 1
Delay 300
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,ssX,ssY
If ssX > 0 And ssY > 0 Then
MoveTo ssx, ssy
    LeftClick 2
End If
Delay 500
FindPic 0,0,1920,1080,"Attachment:\搜索.bmp",0.9,yyX,yyY
If yyX > 0 And yyY > 0 Then
MoveTo yyx-155, yyy+65
    LeftClick 1
End If
Delay 500
    Rem 跳过图片5
//提交图片上传
FindPic 0,0,1920,1080,"Attachment:\确定.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
    MoveTo intx+10, inty+5
        LeftClick 1
End If
    Delay 500
    While 1
    FindPic 0,0,1920,1080,"Attachment:\图片完成.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then 
            MoveTo intx, inty
        LeftClick 1
            KeyPress "Down", 4
    Goto 图片完成
Else
    Delay 300
End If
        Wend
    Rem 图片完成
    Delay 1500
    Goto 跳过详情
//详情标题
FindPic 0,0,1920,1080,"Attachment:\详情图.bmp",0.9,xqtX,xqtY
If xqtX > 0 And xqtY > 0 Then
MoveTo xqtx+30, xqty+37
    LeftClick 3
    Delay 100
    Call Plugin.Sys.SetCLB(productname)
    KeyDown 17, 1
    KeyPress 86, 1
    KeyUp 17, 1
        Delay 500
    KeyPress "Enter", 1
    Delay 200
End If
    Rem 跳过详情
//提交产品
FindPic 0,0,1920,1080,"Attachment:\物流信息.bmp",0.9,cpfzX,cpfzY
If cpfzX > 0 And cpfzY > 0 Then
MoveTo cpfzx, cpfzy
    LeftClick 1
    Delay 300
End If
    KeyPress "Down", 5
    Delay 300
FindPic 0,0,1920,1080,"Attachment:\提交.bmp",0.9,tjX,tjY
If tjX > 0 And tjY > 0 Then
MoveTo tjx+80, tjy+70
        LeftClick 1
    Delay 100
End If
//判断发布成功
While 1
FindPic 0,0,1920,1080,"Attachment:\提交完成.bmp",0.9,fblsX,fblsY
If fblsX > 0 And fblsY > 0 Then
MoveTo fblsx, fblsy
            KeyDown 17, 1
            KeyPress 87, 1
            KeyUp 17, 1
        Goto 发布成功
        Else
    Delay 1000
End If
Wend
Rem 发布成功
//如果达到发布数目,就i = 1 不再循环,停止发布。
    If fabujsq = fabushumu Then 
        i = 1
        Delay 10000
        MessageBox "发布完所有产品"
    Else 
        ////如果还没发布完////////继续发下一个产品 ///////发布计数器+1///////关键词计数器+1///////
        fabujsq = fabujsq + 1
        guanjiancijsq = guanjiancijsq + 1
        Delay 100
    End If
    End Sub

脚本识图:

脚本比较完善,可根据自己产品进行修改,不需要的步骤可进行跳过。
自行发挥,可供参考。

有任何问题留言交流。

分享一下:

小朱博客

View posts by 小朱博客
小朱个人博客,生活网络分享,外贸建站,谷歌seo操作分享,B2B优化排名操作分享,资源分享,软件分享,生活分享。https://www.zhudc.com/

2 Comments

  1. 邢海龚2018年10月16日

    您好,我这边总是无法运行。可以直接向您请教吗

    回复
    1. 小朱博客2018年10月16日

      脚本是2017年的,后台有变动,现在要进行修改,你有没有修改适配,采图,分辨率等等,直接复制当然用不了的。

      回复

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top
%d 博主赞过: