按键精灵自动烧写测试脚本源码

【功能说明】 

<51单片机烧写测试流程自动控制> 

【使用说明】 

<启动时要非烧写软件窗口,烧写软件要先设置好芯片和要下载的文件,先运行测试软件,设置循环延时为0秒,设置安全删除硬件为总是显示>

脚本附件:en_open.bmp, flip.bmp, insert.bmp, run.bmp, run_end.bmp, USB_TEST.bmp

运行环境:分辨率:1024×768 色深:32位 操作系统:Windows XP 按键精灵版本:7.02.4325

//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
相关文件下载地址
©下载资源版权归作者所有;本站所有资源均来源于网络,仅供学习使用,请支持正版!

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注