//UserVar Var1=0 设置内容
PutAttachment *.bmp
dim now
//打开USB口
VBSCall FindPic(140,740,1024,768,"Attachment:\flip.bmp",0.9,intX,intY)
If intX<1
    MessageBox "烧写软件未运行"
Return 
EndIf 
MoveTo intX,intY
LeftClick 1
KeyDown 18,1
Delay 200
KeyPress 83,1
Delay 200
KeyPress 67,1
Delay 200
KeyPress 85,1
Delay 200
KeyUp 18,1
VBSCall FindPic(0,0,1024,768,"Attachment:\en_open.bmp",0.8,intX,intY)
MoveTo intX,intY
LeftClick 1
Delay 1000
//开始烧写
VBSCall FindPic(0,0,1024,768,"Attachment:\run.bmp",1.0,intX,intY)
If intX<1
Return 
EndIf 
MoveTo intX,intY
Delay 200
LeftClick 1
Delay 15000
//烧写是否完成完成
now=0
VBSCall FindPic(0,0,1024,768,"Attachment:\run_end.bmp",1.0,intX,intY)
While intX<1
    Delay 800
    VBSCall FindPic(0,0,1024,768,"Attachment:\run_end.bmp",1.0,intX,intY)
    now=now+1
    If now>10
        MessageBox "烧写失败"
    Return 
EndIf 
//    MoveTo intX,intY
EndFor 
//MessageBox "拔除跳线"
//启动应用程序
VBSCall FindColor(0,0,1024,768,"0000FF",intX,intY)
MoveTo intX+5,intY+5
LeftClick 1
Delay 200
//检测USB是否已经被识别
VBSCall FindPic(850,730,1024,768,"Attachment:\insert.bmp",0.8,intX,intY)
While intX<1
    Delay 800
    VBSCall FindPic(850,730,1024,768,"Attachment:\insert.bmp",0.8,intX,intY)
    //    MoveTo intX,intY
EndFor 
//开始测试
MessageBox "请插卡"
VBSCall FindPic(0,0,1024,768,"Attachment:\USB_TEST.bmp",0.9,intX,intY)
MoveTo intX,intY
LeftClick 1
Delay 200
KeyDown 18,1
Delay 200
KeyPress 84,1
Delay 200
KeyUp 18,1
Delay 200
//判断是否测试完成
VBSCall GetColor=GetPixelColor(356,482)
While GetColor="995E41"
    Delay 800
    VBSCall GetColor=GetPixelColor(356,482)
    //    MoveTo intX,intY
EndFor 
//回车结束一次烧写测试
Delay 10000
KeyPress 13,1
Return