基于STM32的微信视频电话机,让家里的老人也能轻松使用微信视频电话

前言

如今智能信息时代发展迅猛,年轻一代享受着时代红利,而上了年纪的长辈却越来越迷茫,对于智能手机根本搞不清使用方法,很多老人只能退而求其次,使用老人机满足打电话这样的就基本需求,同时老人机存在很多局限:有时老人家会因为心痛电话费刻意控制时长;大多数老人机只能打电话,不能视频通话。如今网络如此发达,微信作为全球统一的及时通讯软件,不但通话免费,还能打视频电话,为何不开发针对老人的微信版本呢?只知道儿童智能手表可以打微信电话,但还是无法满足所有痛点,开造:

项目说明

思路:基于STM32的USB鼠标控制手机完成自动化控制操作,一般的手机都支持USB OTG功能。但OTG功能存在一个很大的弊端,就是无法边充电边使用,本文设计功能切换电路解决了这一问题,可闲时给手机充电。制作此项目需要参考我的前两篇博文。

所需材料

  • 旧安卓智能手机
  • 5pin的MicroUSB接头
  • 矩阵键盘
  • STM32F103C8T6最小系统板
  • 手机支架
  • mos管或继电器
    在这里插入图片描述

一、先看成果

在这里插入图片描述
在这里插入图片描述

  • 键盘功能配置
1 2 3 A
选择联系人1 选择联系人2 选择联系人3 解锁
4 5 6 B
选择联系人4 选择联系人5 选择联系人6 进入微信
7 8 9 C
选择联系人7 选择联系人8 选择联系人9 开始呼叫
* 0 # D
解锁并进入微信 选择联系人0 开始呼叫 结束通话
  • 呼叫流程

#mermaid-svg-uaF1ym8rykXelxAG .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-uaF1ym8rykXelxAG .label text{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .node rect,#mermaid-svg-uaF1ym8rykXelxAG .node circle,#mermaid-svg-uaF1ym8rykXelxAG .node ellipse,#mermaid-svg-uaF1ym8rykXelxAG .node polygon,#mermaid-svg-uaF1ym8rykXelxAG .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-uaF1ym8rykXelxAG .node .label{text-align:center;fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .node.clickable{cursor:pointer}#mermaid-svg-uaF1ym8rykXelxAG .arrowheadPath{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-uaF1ym8rykXelxAG .flowchart-link{stroke:#333;fill:none}#mermaid-svg-uaF1ym8rykXelxAG .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-uaF1ym8rykXelxAG .edgeLabel rect{opacity:0.9}#mermaid-svg-uaF1ym8rykXelxAG .edgeLabel span{color:#333}#mermaid-svg-uaF1ym8rykXelxAG .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-uaF1ym8rykXelxAG .cluster text{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-uaF1ym8rykXelxAG .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-uaF1ym8rykXelxAG text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-uaF1ym8rykXelxAG .actor-line{stroke:grey}#mermaid-svg-uaF1ym8rykXelxAG .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-uaF1ym8rykXelxAG .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-uaF1ym8rykXelxAG #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-uaF1ym8rykXelxAG .sequenceNumber{fill:#fff}#mermaid-svg-uaF1ym8rykXelxAG #sequencenumber{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG #crosshead path{fill:#333;stroke:#333}#mermaid-svg-uaF1ym8rykXelxAG .messageText{fill:#333;stroke:#333}#mermaid-svg-uaF1ym8rykXelxAG .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-uaF1ym8rykXelxAG .labelText,#mermaid-svg-uaF1ym8rykXelxAG .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-uaF1ym8rykXelxAG .loopText,#mermaid-svg-uaF1ym8rykXelxAG .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-uaF1ym8rykXelxAG .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-uaF1ym8rykXelxAG .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-uaF1ym8rykXelxAG .noteText,#mermaid-svg-uaF1ym8rykXelxAG .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-uaF1ym8rykXelxAG .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-uaF1ym8rykXelxAG .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-uaF1ym8rykXelxAG .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-uaF1ym8rykXelxAG .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .section{stroke:none;opacity:0.2}#mermaid-svg-uaF1ym8rykXelxAG .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-uaF1ym8rykXelxAG .section2{fill:#fff400}#mermaid-svg-uaF1ym8rykXelxAG .section1,#mermaid-svg-uaF1ym8rykXelxAG .section3{fill:#fff;opacity:0.2}#mermaid-svg-uaF1ym8rykXelxAG .sectionTitle0{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .sectionTitle1{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .sectionTitle2{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .sectionTitle3{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-uaF1ym8rykXelxAG .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .grid path{stroke-width:0}#mermaid-svg-uaF1ym8rykXelxAG .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-uaF1ym8rykXelxAG .task{stroke-width:2}#mermaid-svg-uaF1ym8rykXelxAG .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .taskText:not([font-size]){font-size:11px}#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-uaF1ym8rykXelxAG .task.clickable{cursor:pointer}#mermaid-svg-uaF1ym8rykXelxAG .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-uaF1ym8rykXelxAG .taskText0,#mermaid-svg-uaF1ym8rykXelxAG .taskText1,#mermaid-svg-uaF1ym8rykXelxAG .taskText2,#mermaid-svg-uaF1ym8rykXelxAG .taskText3{fill:#fff}#mermaid-svg-uaF1ym8rykXelxAG .task0,#mermaid-svg-uaF1ym8rykXelxAG .task1,#mermaid-svg-uaF1ym8rykXelxAG .task2,#mermaid-svg-uaF1ym8rykXelxAG .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutside0,#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutside2{fill:#000}#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutside1,#mermaid-svg-uaF1ym8rykXelxAG .taskTextOutside3{fill:#000}#mermaid-svg-uaF1ym8rykXelxAG .active0,#mermaid-svg-uaF1ym8rykXelxAG .active1,#mermaid-svg-uaF1ym8rykXelxAG .active2,#mermaid-svg-uaF1ym8rykXelxAG .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-uaF1ym8rykXelxAG .activeText0,#mermaid-svg-uaF1ym8rykXelxAG .activeText1,#mermaid-svg-uaF1ym8rykXelxAG .activeText2,#mermaid-svg-uaF1ym8rykXelxAG .activeText3{fill:#000 !important}#mermaid-svg-uaF1ym8rykXelxAG .done0,#mermaid-svg-uaF1ym8rykXelxAG .done1,#mermaid-svg-uaF1ym8rykXelxAG .done2,#mermaid-svg-uaF1ym8rykXelxAG .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-uaF1ym8rykXelxAG .doneText0,#mermaid-svg-uaF1ym8rykXelxAG .doneText1,#mermaid-svg-uaF1ym8rykXelxAG .doneText2,#mermaid-svg-uaF1ym8rykXelxAG .doneText3{fill:#000 !important}#mermaid-svg-uaF1ym8rykXelxAG .crit0,#mermaid-svg-uaF1ym8rykXelxAG .crit1,#mermaid-svg-uaF1ym8rykXelxAG .crit2,#mermaid-svg-uaF1ym8rykXelxAG .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-uaF1ym8rykXelxAG .activeCrit0,#mermaid-svg-uaF1ym8rykXelxAG .activeCrit1,#mermaid-svg-uaF1ym8rykXelxAG .activeCrit2,#mermaid-svg-uaF1ym8rykXelxAG .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-uaF1ym8rykXelxAG .doneCrit0,#mermaid-svg-uaF1ym8rykXelxAG .doneCrit1,#mermaid-svg-uaF1ym8rykXelxAG .doneCrit2,#mermaid-svg-uaF1ym8rykXelxAG .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-uaF1ym8rykXelxAG .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-uaF1ym8rykXelxAG .milestoneText{font-style:italic}#mermaid-svg-uaF1ym8rykXelxAG .doneCritText0,#mermaid-svg-uaF1ym8rykXelxAG .doneCritText1,#mermaid-svg-uaF1ym8rykXelxAG .doneCritText2,#mermaid-svg-uaF1ym8rykXelxAG .doneCritText3{fill:#000 !important}#mermaid-svg-uaF1ym8rykXelxAG .activeCritText0,#mermaid-svg-uaF1ym8rykXelxAG .activeCritText1,#mermaid-svg-uaF1ym8rykXelxAG .activeCritText2,#mermaid-svg-uaF1ym8rykXelxAG .activeCritText3{fill:#000 !important}#mermaid-svg-uaF1ym8rykXelxAG .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-uaF1ym8rykXelxAG g.classGroup text .title{font-weight:bolder}#mermaid-svg-uaF1ym8rykXelxAG g.clickable{cursor:pointer}#mermaid-svg-uaF1ym8rykXelxAG g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-uaF1ym8rykXelxAG g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-uaF1ym8rykXelxAG .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-uaF1ym8rykXelxAG .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-uaF1ym8rykXelxAG .dashed-line{stroke-dasharray:3}#mermaid-svg-uaF1ym8rykXelxAG #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG .commit-id,#mermaid-svg-uaF1ym8rykXelxAG .commit-msg,#mermaid-svg-uaF1ym8rykXelxAG .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-uaF1ym8rykXelxAG g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-uaF1ym8rykXelxAG g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-uaF1ym8rykXelxAG g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-uaF1ym8rykXelxAG .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-uaF1ym8rykXelxAG .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-uaF1ym8rykXelxAG .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-uaF1ym8rykXelxAG .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-uaF1ym8rykXelxAG .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-uaF1ym8rykXelxAG .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-uaF1ym8rykXelxAG .edgeLabel text{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-uaF1ym8rykXelxAG .node circle.state-start{fill:black;stroke:black}#mermaid-svg-uaF1ym8rykXelxAG .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-uaF1ym8rykXelxAG #statediagram-barbEnd{fill:#9370db}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-state .divider{stroke:#9370db}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-uaF1ym8rykXelxAG .note-edge{stroke-dasharray:5}#mermaid-svg-uaF1ym8rykXelxAG .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-uaF1ym8rykXelxAG .error-icon{fill:#522}#mermaid-svg-uaF1ym8rykXelxAG .error-text{fill:#522;stroke:#522}#mermaid-svg-uaF1ym8rykXelxAG .edge-thickness-normal{stroke-width:2px}#mermaid-svg-uaF1ym8rykXelxAG .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-uaF1ym8rykXelxAG .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-uaF1ym8rykXelxAG .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-uaF1ym8rykXelxAG .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-uaF1ym8rykXelxAG .marker{fill:#333}#mermaid-svg-uaF1ym8rykXelxAG .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-uaF1ym8rykXelxAG {
color: rgba(0, 0, 0, 0.75);
font: ;
}

解锁
进入微信
选择联系人
开始呼叫
结束通话

二、硬件设计

1 接线示意图

在这里插入图片描述

1.1 矩阵键盘

矩阵键盘内部接线示意图如下:
在这里插入图片描述

1.2 MicroUSB OTG接口功能切换电路

MicroUSB有5个引脚,其中两个用来供电(VCC、GND),两个用来传输数据(D+、D-),还有一个ID引脚是用来选择OTG功能的。当ID接地时,手机会启用OTG功能,当ID悬空时为普通数据线功能。经过反复实验,发现手机在MicroUSB刚插入时才检测是否开启OTG功能,为了**模拟插入和拔出的操作,用MOS管来断电,用单片机控制ID引脚的电平,实现功能切换,达到空闲时充电的目的。**手头只要一颗IRF540N的N型MOS管,只能用如下电路控制。

在这里插入图片描述
根据数据手册,此MOS管过于大材小用,VDSS = 100V RDS(on) = 44mΩ ID = 33A。
同时VGSth在2-4V之间,而单片机IO在输出电压为3.3V,虽然在这个范围内,但为了使MOS能够完全导通,利用开漏输出功能配合上拉电阻可将IO口输出电压提高到5V。
在这里插入图片描述

2 焊接

为了省去焊接的麻烦,画了一个PCB板,第一板存在一些小问题(没有画入MOS管,加入了音频功放功能作为拓展可以忽略),以上述接线图为准。
在这里插入图片描述

三、软件设计

根据此文章配置好USB鼠标程序框架

结合此文章添加矩阵键盘功能

1 引脚配置

根据以上配置好USB鼠标后配置键盘引脚和USB OTG功能切换控制引脚。
将键盘的8个引脚全部配置为上拉模式,其中4个为输出口、4个为输入口
在这里插入图片描述
将USB OTG控制的两个引脚配置为开漏输出,可修改名称方便阅读
在这里插入图片描述

2.1 修改usb_device.c文件

在编写鼠标控制程序时发现鼠标只能相对移动,无法移动绝对位置,而点击屏幕最重要的时移动到屏幕指定位置。为了解决这一问题,本文采用的方案为:

#mermaid-svg-VcJs76U9MF3lhkR0 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .label text{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .node rect,#mermaid-svg-VcJs76U9MF3lhkR0 .node circle,#mermaid-svg-VcJs76U9MF3lhkR0 .node ellipse,#mermaid-svg-VcJs76U9MF3lhkR0 .node polygon,#mermaid-svg-VcJs76U9MF3lhkR0 .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-VcJs76U9MF3lhkR0 .node .label{text-align:center;fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .node.clickable{cursor:pointer}#mermaid-svg-VcJs76U9MF3lhkR0 .arrowheadPath{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-VcJs76U9MF3lhkR0 .flowchart-link{stroke:#333;fill:none}#mermaid-svg-VcJs76U9MF3lhkR0 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-VcJs76U9MF3lhkR0 .edgeLabel rect{opacity:0.9}#mermaid-svg-VcJs76U9MF3lhkR0 .edgeLabel span{color:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-VcJs76U9MF3lhkR0 .cluster text{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-VcJs76U9MF3lhkR0 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-VcJs76U9MF3lhkR0 text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-VcJs76U9MF3lhkR0 .actor-line{stroke:grey}#mermaid-svg-VcJs76U9MF3lhkR0 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-VcJs76U9MF3lhkR0 #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .sequenceNumber{fill:#fff}#mermaid-svg-VcJs76U9MF3lhkR0 #sequencenumber{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 #crosshead path{fill:#333;stroke:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .messageText{fill:#333;stroke:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-VcJs76U9MF3lhkR0 .labelText,#mermaid-svg-VcJs76U9MF3lhkR0 .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-VcJs76U9MF3lhkR0 .loopText,#mermaid-svg-VcJs76U9MF3lhkR0 .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-VcJs76U9MF3lhkR0 .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-VcJs76U9MF3lhkR0 .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-VcJs76U9MF3lhkR0 .noteText,#mermaid-svg-VcJs76U9MF3lhkR0 .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-VcJs76U9MF3lhkR0 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-VcJs76U9MF3lhkR0 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-VcJs76U9MF3lhkR0 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-VcJs76U9MF3lhkR0 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .section{stroke:none;opacity:0.2}#mermaid-svg-VcJs76U9MF3lhkR0 .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-VcJs76U9MF3lhkR0 .section2{fill:#fff400}#mermaid-svg-VcJs76U9MF3lhkR0 .section1,#mermaid-svg-VcJs76U9MF3lhkR0 .section3{fill:#fff;opacity:0.2}#mermaid-svg-VcJs76U9MF3lhkR0 .sectionTitle0{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .sectionTitle1{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .sectionTitle2{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .sectionTitle3{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-VcJs76U9MF3lhkR0 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .grid path{stroke-width:0}#mermaid-svg-VcJs76U9MF3lhkR0 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-VcJs76U9MF3lhkR0 .task{stroke-width:2}#mermaid-svg-VcJs76U9MF3lhkR0 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .taskText:not([font-size]){font-size:11px}#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-VcJs76U9MF3lhkR0 .task.clickable{cursor:pointer}#mermaid-svg-VcJs76U9MF3lhkR0 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-VcJs76U9MF3lhkR0 .taskText0,#mermaid-svg-VcJs76U9MF3lhkR0 .taskText1,#mermaid-svg-VcJs76U9MF3lhkR0 .taskText2,#mermaid-svg-VcJs76U9MF3lhkR0 .taskText3{fill:#fff}#mermaid-svg-VcJs76U9MF3lhkR0 .task0,#mermaid-svg-VcJs76U9MF3lhkR0 .task1,#mermaid-svg-VcJs76U9MF3lhkR0 .task2,#mermaid-svg-VcJs76U9MF3lhkR0 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutside0,#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutside2{fill:#000}#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutside1,#mermaid-svg-VcJs76U9MF3lhkR0 .taskTextOutside3{fill:#000}#mermaid-svg-VcJs76U9MF3lhkR0 .active0,#mermaid-svg-VcJs76U9MF3lhkR0 .active1,#mermaid-svg-VcJs76U9MF3lhkR0 .active2,#mermaid-svg-VcJs76U9MF3lhkR0 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-VcJs76U9MF3lhkR0 .activeText0,#mermaid-svg-VcJs76U9MF3lhkR0 .activeText1,#mermaid-svg-VcJs76U9MF3lhkR0 .activeText2,#mermaid-svg-VcJs76U9MF3lhkR0 .activeText3{fill:#000 !important}#mermaid-svg-VcJs76U9MF3lhkR0 .done0,#mermaid-svg-VcJs76U9MF3lhkR0 .done1,#mermaid-svg-VcJs76U9MF3lhkR0 .done2,#mermaid-svg-VcJs76U9MF3lhkR0 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-VcJs76U9MF3lhkR0 .doneText0,#mermaid-svg-VcJs76U9MF3lhkR0 .doneText1,#mermaid-svg-VcJs76U9MF3lhkR0 .doneText2,#mermaid-svg-VcJs76U9MF3lhkR0 .doneText3{fill:#000 !important}#mermaid-svg-VcJs76U9MF3lhkR0 .crit0,#mermaid-svg-VcJs76U9MF3lhkR0 .crit1,#mermaid-svg-VcJs76U9MF3lhkR0 .crit2,#mermaid-svg-VcJs76U9MF3lhkR0 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-VcJs76U9MF3lhkR0 .activeCrit0,#mermaid-svg-VcJs76U9MF3lhkR0 .activeCrit1,#mermaid-svg-VcJs76U9MF3lhkR0 .activeCrit2,#mermaid-svg-VcJs76U9MF3lhkR0 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-VcJs76U9MF3lhkR0 .doneCrit0,#mermaid-svg-VcJs76U9MF3lhkR0 .doneCrit1,#mermaid-svg-VcJs76U9MF3lhkR0 .doneCrit2,#mermaid-svg-VcJs76U9MF3lhkR0 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-VcJs76U9MF3lhkR0 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-VcJs76U9MF3lhkR0 .milestoneText{font-style:italic}#mermaid-svg-VcJs76U9MF3lhkR0 .doneCritText0,#mermaid-svg-VcJs76U9MF3lhkR0 .doneCritText1,#mermaid-svg-VcJs76U9MF3lhkR0 .doneCritText2,#mermaid-svg-VcJs76U9MF3lhkR0 .doneCritText3{fill:#000 !important}#mermaid-svg-VcJs76U9MF3lhkR0 .activeCritText0,#mermaid-svg-VcJs76U9MF3lhkR0 .activeCritText1,#mermaid-svg-VcJs76U9MF3lhkR0 .activeCritText2,#mermaid-svg-VcJs76U9MF3lhkR0 .activeCritText3{fill:#000 !important}#mermaid-svg-VcJs76U9MF3lhkR0 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-VcJs76U9MF3lhkR0 g.classGroup text .title{font-weight:bolder}#mermaid-svg-VcJs76U9MF3lhkR0 g.clickable{cursor:pointer}#mermaid-svg-VcJs76U9MF3lhkR0 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-VcJs76U9MF3lhkR0 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-VcJs76U9MF3lhkR0 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-VcJs76U9MF3lhkR0 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-VcJs76U9MF3lhkR0 .dashed-line{stroke-dasharray:3}#mermaid-svg-VcJs76U9MF3lhkR0 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 .commit-id,#mermaid-svg-VcJs76U9MF3lhkR0 .commit-msg,#mermaid-svg-VcJs76U9MF3lhkR0 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-VcJs76U9MF3lhkR0 g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-VcJs76U9MF3lhkR0 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-VcJs76U9MF3lhkR0 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-VcJs76U9MF3lhkR0 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-VcJs76U9MF3lhkR0 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-VcJs76U9MF3lhkR0 .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-VcJs76U9MF3lhkR0 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-VcJs76U9MF3lhkR0 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-VcJs76U9MF3lhkR0 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-VcJs76U9MF3lhkR0 .edgeLabel text{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-VcJs76U9MF3lhkR0 .node circle.state-start{fill:black;stroke:black}#mermaid-svg-VcJs76U9MF3lhkR0 .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-VcJs76U9MF3lhkR0 #statediagram-barbEnd{fill:#9370db}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-state .divider{stroke:#9370db}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-VcJs76U9MF3lhkR0 .note-edge{stroke-dasharray:5}#mermaid-svg-VcJs76U9MF3lhkR0 .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-VcJs76U9MF3lhkR0 .error-icon{fill:#522}#mermaid-svg-VcJs76U9MF3lhkR0 .error-text{fill:#522;stroke:#522}#mermaid-svg-VcJs76U9MF3lhkR0 .edge-thickness-normal{stroke-width:2px}#mermaid-svg-VcJs76U9MF3lhkR0 .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-VcJs76U9MF3lhkR0 .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-VcJs76U9MF3lhkR0 .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-VcJs76U9MF3lhkR0 .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-VcJs76U9MF3lhkR0 .marker{fill:#333}#mermaid-svg-VcJs76U9MF3lhkR0 .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-VcJs76U9MF3lhkR0 {
color: rgba(0, 0, 0, 0.75);
font: ;
}

一直移动到最左上角
设为原点
相对移动
计算绝对位置

添加静态变量

/* USER CODE BEGIN 0 */
static int16_t Px=0,Py=0;//绝对位置
static uint8_t L=0,R=0,M=0;//鼠标上三个按键状态
/* USER CODE END 0 */

添加鼠标基本控制函数

/* USER CODE BEGIN 1 */
//发送鼠标所有控制信息
void Set_Mouse(int8_t x,int8_t y,int8_t z,uint8_t l,uint8_t r,uint8_t m)
{
	uint8_t buf[4] = {0,0,0,0};
	L=l;R=r;M=m;
	buf[0] = L+R*2+M*4;
	buf[1]=x;
	buf[2]=y;
	buf[3]=z;
	USBD_HID_SendReport(&hUsbDeviceFS,buf,4);
	HAL_Delay(100);
}
//滚轮滚动
void Scroll(int8_t z)
{
	Set_Mouse(0,0,z,L,R,M);
}
//鼠标相对移动
void Move(int8_t x,int8_t y)
{
	Px += x;
	Py += y;
	
	if(Px<0)Px=0;
	if(Py<0)Py=0;
	if(Px>=PX_MAX-1)Px=PX_MAX-1;
	if(Py>=PY_MAX-1)Py=PY_MAX-1;
	
	Set_Mouse(x,y,0,L,R,M);
}
//鼠标移动到最左上角
void Move_Reset(void)
{
	uint8_t i=16;
	while(i--)Move(-120,-120);
  Px = Py = 0;
}
//鼠标绝对移动
void Move_To(int16_t x,int16_t y)
{
	x -= Px;
  y -= Py;
	if(x > 0){while(x >= 100)x -= 100,Move(100,0);}
	else {while (x <= -100)x += 100,Move(-100,0);}
	Move(x,0);

	if(y > 0){while(y >= 100)y -= 100,Move(0,100);}
	else {while(y <= -100)y += 100,Move(0,-100);}
	Move(0,y);
}
//单击左键
void Click_L(void)
{
	Set_Mouse(0,0,0,1,0,0);
	Set_Mouse(0,0,0,0,0,0);
}
//单击右键
void Click_R(void)
{
	Set_Mouse(0,0,0,0,1,0);
	Set_Mouse(0,0,0,0,0,0);
}
//单击中键
void Click_M(void)
{
	Set_Mouse(0,0,0,0,0,1);
	Set_Mouse(0,0,0,0,0,0);
}
//移动到指定位置单击左键
void Move_To_Click(int16_t x,int16_t y)
{
	Move_To(x,y);
	Click_L();
}

添加自动化程序,需要将手机开发者选项打开,显示指针位置,方便确定每个步骤点击屏幕的具体位置。本文使用的安卓手机屏幕分辨率为1080x1920.
手机解锁程序:滑动解锁

#mermaid-svg-tfu8CgtGtQrLRhfw .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .label text{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .node rect,#mermaid-svg-tfu8CgtGtQrLRhfw .node circle,#mermaid-svg-tfu8CgtGtQrLRhfw .node ellipse,#mermaid-svg-tfu8CgtGtQrLRhfw .node polygon,#mermaid-svg-tfu8CgtGtQrLRhfw .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-tfu8CgtGtQrLRhfw .node .label{text-align:center;fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .node.clickable{cursor:pointer}#mermaid-svg-tfu8CgtGtQrLRhfw .arrowheadPath{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-tfu8CgtGtQrLRhfw .flowchart-link{stroke:#333;fill:none}#mermaid-svg-tfu8CgtGtQrLRhfw .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-tfu8CgtGtQrLRhfw .edgeLabel rect{opacity:0.9}#mermaid-svg-tfu8CgtGtQrLRhfw .edgeLabel span{color:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-tfu8CgtGtQrLRhfw .cluster text{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-tfu8CgtGtQrLRhfw .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-tfu8CgtGtQrLRhfw text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-tfu8CgtGtQrLRhfw .actor-line{stroke:grey}#mermaid-svg-tfu8CgtGtQrLRhfw .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-tfu8CgtGtQrLRhfw #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .sequenceNumber{fill:#fff}#mermaid-svg-tfu8CgtGtQrLRhfw #sequencenumber{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw #crosshead path{fill:#333;stroke:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .messageText{fill:#333;stroke:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-tfu8CgtGtQrLRhfw .labelText,#mermaid-svg-tfu8CgtGtQrLRhfw .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-tfu8CgtGtQrLRhfw .loopText,#mermaid-svg-tfu8CgtGtQrLRhfw .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-tfu8CgtGtQrLRhfw .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-tfu8CgtGtQrLRhfw .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-tfu8CgtGtQrLRhfw .noteText,#mermaid-svg-tfu8CgtGtQrLRhfw .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-tfu8CgtGtQrLRhfw .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-tfu8CgtGtQrLRhfw .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-tfu8CgtGtQrLRhfw .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-tfu8CgtGtQrLRhfw .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .section{stroke:none;opacity:0.2}#mermaid-svg-tfu8CgtGtQrLRhfw .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-tfu8CgtGtQrLRhfw .section2{fill:#fff400}#mermaid-svg-tfu8CgtGtQrLRhfw .section1,#mermaid-svg-tfu8CgtGtQrLRhfw .section3{fill:#fff;opacity:0.2}#mermaid-svg-tfu8CgtGtQrLRhfw .sectionTitle0{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .sectionTitle1{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .sectionTitle2{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .sectionTitle3{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-tfu8CgtGtQrLRhfw .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .grid path{stroke-width:0}#mermaid-svg-tfu8CgtGtQrLRhfw .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-tfu8CgtGtQrLRhfw .task{stroke-width:2}#mermaid-svg-tfu8CgtGtQrLRhfw .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .taskText:not([font-size]){font-size:11px}#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-tfu8CgtGtQrLRhfw .task.clickable{cursor:pointer}#mermaid-svg-tfu8CgtGtQrLRhfw .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-tfu8CgtGtQrLRhfw .taskText0,#mermaid-svg-tfu8CgtGtQrLRhfw .taskText1,#mermaid-svg-tfu8CgtGtQrLRhfw .taskText2,#mermaid-svg-tfu8CgtGtQrLRhfw .taskText3{fill:#fff}#mermaid-svg-tfu8CgtGtQrLRhfw .task0,#mermaid-svg-tfu8CgtGtQrLRhfw .task1,#mermaid-svg-tfu8CgtGtQrLRhfw .task2,#mermaid-svg-tfu8CgtGtQrLRhfw .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutside0,#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutside2{fill:#000}#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutside1,#mermaid-svg-tfu8CgtGtQrLRhfw .taskTextOutside3{fill:#000}#mermaid-svg-tfu8CgtGtQrLRhfw .active0,#mermaid-svg-tfu8CgtGtQrLRhfw .active1,#mermaid-svg-tfu8CgtGtQrLRhfw .active2,#mermaid-svg-tfu8CgtGtQrLRhfw .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-tfu8CgtGtQrLRhfw .activeText0,#mermaid-svg-tfu8CgtGtQrLRhfw .activeText1,#mermaid-svg-tfu8CgtGtQrLRhfw .activeText2,#mermaid-svg-tfu8CgtGtQrLRhfw .activeText3{fill:#000 !important}#mermaid-svg-tfu8CgtGtQrLRhfw .done0,#mermaid-svg-tfu8CgtGtQrLRhfw .done1,#mermaid-svg-tfu8CgtGtQrLRhfw .done2,#mermaid-svg-tfu8CgtGtQrLRhfw .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-tfu8CgtGtQrLRhfw .doneText0,#mermaid-svg-tfu8CgtGtQrLRhfw .doneText1,#mermaid-svg-tfu8CgtGtQrLRhfw .doneText2,#mermaid-svg-tfu8CgtGtQrLRhfw .doneText3{fill:#000 !important}#mermaid-svg-tfu8CgtGtQrLRhfw .crit0,#mermaid-svg-tfu8CgtGtQrLRhfw .crit1,#mermaid-svg-tfu8CgtGtQrLRhfw .crit2,#mermaid-svg-tfu8CgtGtQrLRhfw .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-tfu8CgtGtQrLRhfw .activeCrit0,#mermaid-svg-tfu8CgtGtQrLRhfw .activeCrit1,#mermaid-svg-tfu8CgtGtQrLRhfw .activeCrit2,#mermaid-svg-tfu8CgtGtQrLRhfw .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-tfu8CgtGtQrLRhfw .doneCrit0,#mermaid-svg-tfu8CgtGtQrLRhfw .doneCrit1,#mermaid-svg-tfu8CgtGtQrLRhfw .doneCrit2,#mermaid-svg-tfu8CgtGtQrLRhfw .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-tfu8CgtGtQrLRhfw .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-tfu8CgtGtQrLRhfw .milestoneText{font-style:italic}#mermaid-svg-tfu8CgtGtQrLRhfw .doneCritText0,#mermaid-svg-tfu8CgtGtQrLRhfw .doneCritText1,#mermaid-svg-tfu8CgtGtQrLRhfw .doneCritText2,#mermaid-svg-tfu8CgtGtQrLRhfw .doneCritText3{fill:#000 !important}#mermaid-svg-tfu8CgtGtQrLRhfw .activeCritText0,#mermaid-svg-tfu8CgtGtQrLRhfw .activeCritText1,#mermaid-svg-tfu8CgtGtQrLRhfw .activeCritText2,#mermaid-svg-tfu8CgtGtQrLRhfw .activeCritText3{fill:#000 !important}#mermaid-svg-tfu8CgtGtQrLRhfw .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-tfu8CgtGtQrLRhfw g.classGroup text .title{font-weight:bolder}#mermaid-svg-tfu8CgtGtQrLRhfw g.clickable{cursor:pointer}#mermaid-svg-tfu8CgtGtQrLRhfw g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-tfu8CgtGtQrLRhfw g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-tfu8CgtGtQrLRhfw .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-tfu8CgtGtQrLRhfw .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-tfu8CgtGtQrLRhfw .dashed-line{stroke-dasharray:3}#mermaid-svg-tfu8CgtGtQrLRhfw #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw .commit-id,#mermaid-svg-tfu8CgtGtQrLRhfw .commit-msg,#mermaid-svg-tfu8CgtGtQrLRhfw .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-tfu8CgtGtQrLRhfw g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-tfu8CgtGtQrLRhfw g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-tfu8CgtGtQrLRhfw g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-tfu8CgtGtQrLRhfw .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-tfu8CgtGtQrLRhfw .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-tfu8CgtGtQrLRhfw .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-tfu8CgtGtQrLRhfw .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-tfu8CgtGtQrLRhfw .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-tfu8CgtGtQrLRhfw .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-tfu8CgtGtQrLRhfw .edgeLabel text{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-tfu8CgtGtQrLRhfw .node circle.state-start{fill:black;stroke:black}#mermaid-svg-tfu8CgtGtQrLRhfw .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-tfu8CgtGtQrLRhfw #statediagram-barbEnd{fill:#9370db}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-state .divider{stroke:#9370db}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-tfu8CgtGtQrLRhfw .note-edge{stroke-dasharray:5}#mermaid-svg-tfu8CgtGtQrLRhfw .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-tfu8CgtGtQrLRhfw .error-icon{fill:#522}#mermaid-svg-tfu8CgtGtQrLRhfw .error-text{fill:#522;stroke:#522}#mermaid-svg-tfu8CgtGtQrLRhfw .edge-thickness-normal{stroke-width:2px}#mermaid-svg-tfu8CgtGtQrLRhfw .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-tfu8CgtGtQrLRhfw .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-tfu8CgtGtQrLRhfw .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-tfu8CgtGtQrLRhfw .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-tfu8CgtGtQrLRhfw .marker{fill:#333}#mermaid-svg-tfu8CgtGtQrLRhfw .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-tfu8CgtGtQrLRhfw {
color: rgba(0, 0, 0, 0.75);
font: ;
}

移动到中下位置
按下左键
向上移动
松开左键
void Unlock(void)
{
	Move_To_Click(550,1890);//点击主页 为了防止已经解锁后乱点
	HAL_Delay(1000);//等待1s
	Move_To(600,1400);//移动到中下位置
	Set_Mouse(0,0,0,1,0,0);//按下左键
	Move_To(600,1000);//向上移动
	Set_Mouse(0,0,0,0,0,0);//松开左键
}

打开微信
先将微信图标放在桌面第2页特定位置,方便点击

#mermaid-svg-4Xevs19vOzQfZ2ve .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .label text{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .node rect,#mermaid-svg-4Xevs19vOzQfZ2ve .node circle,#mermaid-svg-4Xevs19vOzQfZ2ve .node ellipse,#mermaid-svg-4Xevs19vOzQfZ2ve .node polygon,#mermaid-svg-4Xevs19vOzQfZ2ve .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-4Xevs19vOzQfZ2ve .node .label{text-align:center;fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .node.clickable{cursor:pointer}#mermaid-svg-4Xevs19vOzQfZ2ve .arrowheadPath{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-4Xevs19vOzQfZ2ve .flowchart-link{stroke:#333;fill:none}#mermaid-svg-4Xevs19vOzQfZ2ve .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-4Xevs19vOzQfZ2ve .edgeLabel rect{opacity:0.9}#mermaid-svg-4Xevs19vOzQfZ2ve .edgeLabel span{color:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-4Xevs19vOzQfZ2ve .cluster text{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-4Xevs19vOzQfZ2ve .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-4Xevs19vOzQfZ2ve text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-4Xevs19vOzQfZ2ve .actor-line{stroke:grey}#mermaid-svg-4Xevs19vOzQfZ2ve .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-4Xevs19vOzQfZ2ve #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .sequenceNumber{fill:#fff}#mermaid-svg-4Xevs19vOzQfZ2ve #sequencenumber{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve #crosshead path{fill:#333;stroke:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .messageText{fill:#333;stroke:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-4Xevs19vOzQfZ2ve .labelText,#mermaid-svg-4Xevs19vOzQfZ2ve .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-4Xevs19vOzQfZ2ve .loopText,#mermaid-svg-4Xevs19vOzQfZ2ve .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-4Xevs19vOzQfZ2ve .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-4Xevs19vOzQfZ2ve .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-4Xevs19vOzQfZ2ve .noteText,#mermaid-svg-4Xevs19vOzQfZ2ve .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-4Xevs19vOzQfZ2ve .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-4Xevs19vOzQfZ2ve .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-4Xevs19vOzQfZ2ve .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-4Xevs19vOzQfZ2ve .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .section{stroke:none;opacity:0.2}#mermaid-svg-4Xevs19vOzQfZ2ve .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-4Xevs19vOzQfZ2ve .section2{fill:#fff400}#mermaid-svg-4Xevs19vOzQfZ2ve .section1,#mermaid-svg-4Xevs19vOzQfZ2ve .section3{fill:#fff;opacity:0.2}#mermaid-svg-4Xevs19vOzQfZ2ve .sectionTitle0{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .sectionTitle1{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .sectionTitle2{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .sectionTitle3{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-4Xevs19vOzQfZ2ve .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .grid path{stroke-width:0}#mermaid-svg-4Xevs19vOzQfZ2ve .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-4Xevs19vOzQfZ2ve .task{stroke-width:2}#mermaid-svg-4Xevs19vOzQfZ2ve .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .taskText:not([font-size]){font-size:11px}#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-4Xevs19vOzQfZ2ve .task.clickable{cursor:pointer}#mermaid-svg-4Xevs19vOzQfZ2ve .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-4Xevs19vOzQfZ2ve .taskText0,#mermaid-svg-4Xevs19vOzQfZ2ve .taskText1,#mermaid-svg-4Xevs19vOzQfZ2ve .taskText2,#mermaid-svg-4Xevs19vOzQfZ2ve .taskText3{fill:#fff}#mermaid-svg-4Xevs19vOzQfZ2ve .task0,#mermaid-svg-4Xevs19vOzQfZ2ve .task1,#mermaid-svg-4Xevs19vOzQfZ2ve .task2,#mermaid-svg-4Xevs19vOzQfZ2ve .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutside0,#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutside2{fill:#000}#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutside1,#mermaid-svg-4Xevs19vOzQfZ2ve .taskTextOutside3{fill:#000}#mermaid-svg-4Xevs19vOzQfZ2ve .active0,#mermaid-svg-4Xevs19vOzQfZ2ve .active1,#mermaid-svg-4Xevs19vOzQfZ2ve .active2,#mermaid-svg-4Xevs19vOzQfZ2ve .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-4Xevs19vOzQfZ2ve .activeText0,#mermaid-svg-4Xevs19vOzQfZ2ve .activeText1,#mermaid-svg-4Xevs19vOzQfZ2ve .activeText2,#mermaid-svg-4Xevs19vOzQfZ2ve .activeText3{fill:#000 !important}#mermaid-svg-4Xevs19vOzQfZ2ve .done0,#mermaid-svg-4Xevs19vOzQfZ2ve .done1,#mermaid-svg-4Xevs19vOzQfZ2ve .done2,#mermaid-svg-4Xevs19vOzQfZ2ve .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-4Xevs19vOzQfZ2ve .doneText0,#mermaid-svg-4Xevs19vOzQfZ2ve .doneText1,#mermaid-svg-4Xevs19vOzQfZ2ve .doneText2,#mermaid-svg-4Xevs19vOzQfZ2ve .doneText3{fill:#000 !important}#mermaid-svg-4Xevs19vOzQfZ2ve .crit0,#mermaid-svg-4Xevs19vOzQfZ2ve .crit1,#mermaid-svg-4Xevs19vOzQfZ2ve .crit2,#mermaid-svg-4Xevs19vOzQfZ2ve .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-4Xevs19vOzQfZ2ve .activeCrit0,#mermaid-svg-4Xevs19vOzQfZ2ve .activeCrit1,#mermaid-svg-4Xevs19vOzQfZ2ve .activeCrit2,#mermaid-svg-4Xevs19vOzQfZ2ve .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-4Xevs19vOzQfZ2ve .doneCrit0,#mermaid-svg-4Xevs19vOzQfZ2ve .doneCrit1,#mermaid-svg-4Xevs19vOzQfZ2ve .doneCrit2,#mermaid-svg-4Xevs19vOzQfZ2ve .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-4Xevs19vOzQfZ2ve .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-4Xevs19vOzQfZ2ve .milestoneText{font-style:italic}#mermaid-svg-4Xevs19vOzQfZ2ve .doneCritText0,#mermaid-svg-4Xevs19vOzQfZ2ve .doneCritText1,#mermaid-svg-4Xevs19vOzQfZ2ve .doneCritText2,#mermaid-svg-4Xevs19vOzQfZ2ve .doneCritText3{fill:#000 !important}#mermaid-svg-4Xevs19vOzQfZ2ve .activeCritText0,#mermaid-svg-4Xevs19vOzQfZ2ve .activeCritText1,#mermaid-svg-4Xevs19vOzQfZ2ve .activeCritText2,#mermaid-svg-4Xevs19vOzQfZ2ve .activeCritText3{fill:#000 !important}#mermaid-svg-4Xevs19vOzQfZ2ve .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-4Xevs19vOzQfZ2ve g.classGroup text .title{font-weight:bolder}#mermaid-svg-4Xevs19vOzQfZ2ve g.clickable{cursor:pointer}#mermaid-svg-4Xevs19vOzQfZ2ve g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-4Xevs19vOzQfZ2ve g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-4Xevs19vOzQfZ2ve .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-4Xevs19vOzQfZ2ve .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-4Xevs19vOzQfZ2ve .dashed-line{stroke-dasharray:3}#mermaid-svg-4Xevs19vOzQfZ2ve #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve .commit-id,#mermaid-svg-4Xevs19vOzQfZ2ve .commit-msg,#mermaid-svg-4Xevs19vOzQfZ2ve .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-4Xevs19vOzQfZ2ve g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-4Xevs19vOzQfZ2ve g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-4Xevs19vOzQfZ2ve g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-4Xevs19vOzQfZ2ve .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-4Xevs19vOzQfZ2ve .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-4Xevs19vOzQfZ2ve .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-4Xevs19vOzQfZ2ve .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-4Xevs19vOzQfZ2ve .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-4Xevs19vOzQfZ2ve .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-4Xevs19vOzQfZ2ve .edgeLabel text{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-4Xevs19vOzQfZ2ve .node circle.state-start{fill:black;stroke:black}#mermaid-svg-4Xevs19vOzQfZ2ve .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-4Xevs19vOzQfZ2ve #statediagram-barbEnd{fill:#9370db}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-state .divider{stroke:#9370db}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-4Xevs19vOzQfZ2ve .note-edge{stroke-dasharray:5}#mermaid-svg-4Xevs19vOzQfZ2ve .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-4Xevs19vOzQfZ2ve .error-icon{fill:#522}#mermaid-svg-4Xevs19vOzQfZ2ve .error-text{fill:#522;stroke:#522}#mermaid-svg-4Xevs19vOzQfZ2ve .edge-thickness-normal{stroke-width:2px}#mermaid-svg-4Xevs19vOzQfZ2ve .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-4Xevs19vOzQfZ2ve .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-4Xevs19vOzQfZ2ve .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-4Xevs19vOzQfZ2ve .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-4Xevs19vOzQfZ2ve .marker{fill:#333}#mermaid-svg-4Xevs19vOzQfZ2ve .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-4Xevs19vOzQfZ2ve {
color: rgba(0, 0, 0, 0.75);
font: ;
}

移动到中下位置
滚轮翻页
点击微信图标
void Open_Wechat(void)
{
	Move_To_Click(550,1890);//主页
	HAL_Delay(1000);//等待1s
	Move_To(550,1000);//移动到中下某位置
	Scroll(-100);//翻页
	Move_To_Click(150,150);//点击微信图标
	HAL_Delay(1000);//等待1s
	Move_To_Click(400,1740);//点击微信通讯录
}

选择联系人
先将微信中联系人的备注添加前缀,这样就能进行排序。本文将常用的10个联系人备注分别加上 A0、A1、A2、A3、A4、A5、A6、A7、A8、A9。这样就可以精确定位联系人了。

#mermaid-svg-Zweev9V959Z9dLtm .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-Zweev9V959Z9dLtm .label text{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .node rect,#mermaid-svg-Zweev9V959Z9dLtm .node circle,#mermaid-svg-Zweev9V959Z9dLtm .node ellipse,#mermaid-svg-Zweev9V959Z9dLtm .node polygon,#mermaid-svg-Zweev9V959Z9dLtm .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-Zweev9V959Z9dLtm .node .label{text-align:center;fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .node.clickable{cursor:pointer}#mermaid-svg-Zweev9V959Z9dLtm .arrowheadPath{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-Zweev9V959Z9dLtm .flowchart-link{stroke:#333;fill:none}#mermaid-svg-Zweev9V959Z9dLtm .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-Zweev9V959Z9dLtm .edgeLabel rect{opacity:0.9}#mermaid-svg-Zweev9V959Z9dLtm .edgeLabel span{color:#333}#mermaid-svg-Zweev9V959Z9dLtm .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-Zweev9V959Z9dLtm .cluster text{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-Zweev9V959Z9dLtm .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-Zweev9V959Z9dLtm text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-Zweev9V959Z9dLtm .actor-line{stroke:grey}#mermaid-svg-Zweev9V959Z9dLtm .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-Zweev9V959Z9dLtm .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-Zweev9V959Z9dLtm #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-Zweev9V959Z9dLtm .sequenceNumber{fill:#fff}#mermaid-svg-Zweev9V959Z9dLtm #sequencenumber{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm #crosshead path{fill:#333;stroke:#333}#mermaid-svg-Zweev9V959Z9dLtm .messageText{fill:#333;stroke:#333}#mermaid-svg-Zweev9V959Z9dLtm .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-Zweev9V959Z9dLtm .labelText,#mermaid-svg-Zweev9V959Z9dLtm .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-Zweev9V959Z9dLtm .loopText,#mermaid-svg-Zweev9V959Z9dLtm .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-Zweev9V959Z9dLtm .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-Zweev9V959Z9dLtm .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-Zweev9V959Z9dLtm .noteText,#mermaid-svg-Zweev9V959Z9dLtm .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-Zweev9V959Z9dLtm .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-Zweev9V959Z9dLtm .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-Zweev9V959Z9dLtm .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-Zweev9V959Z9dLtm .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .section{stroke:none;opacity:0.2}#mermaid-svg-Zweev9V959Z9dLtm .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-Zweev9V959Z9dLtm .section2{fill:#fff400}#mermaid-svg-Zweev9V959Z9dLtm .section1,#mermaid-svg-Zweev9V959Z9dLtm .section3{fill:#fff;opacity:0.2}#mermaid-svg-Zweev9V959Z9dLtm .sectionTitle0{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .sectionTitle1{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .sectionTitle2{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .sectionTitle3{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-Zweev9V959Z9dLtm .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .grid path{stroke-width:0}#mermaid-svg-Zweev9V959Z9dLtm .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-Zweev9V959Z9dLtm .task{stroke-width:2}#mermaid-svg-Zweev9V959Z9dLtm .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .taskText:not([font-size]){font-size:11px}#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-Zweev9V959Z9dLtm .task.clickable{cursor:pointer}#mermaid-svg-Zweev9V959Z9dLtm .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-Zweev9V959Z9dLtm .taskText0,#mermaid-svg-Zweev9V959Z9dLtm .taskText1,#mermaid-svg-Zweev9V959Z9dLtm .taskText2,#mermaid-svg-Zweev9V959Z9dLtm .taskText3{fill:#fff}#mermaid-svg-Zweev9V959Z9dLtm .task0,#mermaid-svg-Zweev9V959Z9dLtm .task1,#mermaid-svg-Zweev9V959Z9dLtm .task2,#mermaid-svg-Zweev9V959Z9dLtm .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutside0,#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutside2{fill:#000}#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutside1,#mermaid-svg-Zweev9V959Z9dLtm .taskTextOutside3{fill:#000}#mermaid-svg-Zweev9V959Z9dLtm .active0,#mermaid-svg-Zweev9V959Z9dLtm .active1,#mermaid-svg-Zweev9V959Z9dLtm .active2,#mermaid-svg-Zweev9V959Z9dLtm .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-Zweev9V959Z9dLtm .activeText0,#mermaid-svg-Zweev9V959Z9dLtm .activeText1,#mermaid-svg-Zweev9V959Z9dLtm .activeText2,#mermaid-svg-Zweev9V959Z9dLtm .activeText3{fill:#000 !important}#mermaid-svg-Zweev9V959Z9dLtm .done0,#mermaid-svg-Zweev9V959Z9dLtm .done1,#mermaid-svg-Zweev9V959Z9dLtm .done2,#mermaid-svg-Zweev9V959Z9dLtm .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-Zweev9V959Z9dLtm .doneText0,#mermaid-svg-Zweev9V959Z9dLtm .doneText1,#mermaid-svg-Zweev9V959Z9dLtm .doneText2,#mermaid-svg-Zweev9V959Z9dLtm .doneText3{fill:#000 !important}#mermaid-svg-Zweev9V959Z9dLtm .crit0,#mermaid-svg-Zweev9V959Z9dLtm .crit1,#mermaid-svg-Zweev9V959Z9dLtm .crit2,#mermaid-svg-Zweev9V959Z9dLtm .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-Zweev9V959Z9dLtm .activeCrit0,#mermaid-svg-Zweev9V959Z9dLtm .activeCrit1,#mermaid-svg-Zweev9V959Z9dLtm .activeCrit2,#mermaid-svg-Zweev9V959Z9dLtm .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-Zweev9V959Z9dLtm .doneCrit0,#mermaid-svg-Zweev9V959Z9dLtm .doneCrit1,#mermaid-svg-Zweev9V959Z9dLtm .doneCrit2,#mermaid-svg-Zweev9V959Z9dLtm .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-Zweev9V959Z9dLtm .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-Zweev9V959Z9dLtm .milestoneText{font-style:italic}#mermaid-svg-Zweev9V959Z9dLtm .doneCritText0,#mermaid-svg-Zweev9V959Z9dLtm .doneCritText1,#mermaid-svg-Zweev9V959Z9dLtm .doneCritText2,#mermaid-svg-Zweev9V959Z9dLtm .doneCritText3{fill:#000 !important}#mermaid-svg-Zweev9V959Z9dLtm .activeCritText0,#mermaid-svg-Zweev9V959Z9dLtm .activeCritText1,#mermaid-svg-Zweev9V959Z9dLtm .activeCritText2,#mermaid-svg-Zweev9V959Z9dLtm .activeCritText3{fill:#000 !important}#mermaid-svg-Zweev9V959Z9dLtm .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-Zweev9V959Z9dLtm g.classGroup text .title{font-weight:bolder}#mermaid-svg-Zweev9V959Z9dLtm g.clickable{cursor:pointer}#mermaid-svg-Zweev9V959Z9dLtm g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-Zweev9V959Z9dLtm g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-Zweev9V959Z9dLtm .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-Zweev9V959Z9dLtm .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-Zweev9V959Z9dLtm .dashed-line{stroke-dasharray:3}#mermaid-svg-Zweev9V959Z9dLtm #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm .commit-id,#mermaid-svg-Zweev9V959Z9dLtm .commit-msg,#mermaid-svg-Zweev9V959Z9dLtm .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-Zweev9V959Z9dLtm g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-Zweev9V959Z9dLtm g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-Zweev9V959Z9dLtm g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-Zweev9V959Z9dLtm .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-Zweev9V959Z9dLtm .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-Zweev9V959Z9dLtm .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-Zweev9V959Z9dLtm .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-Zweev9V959Z9dLtm .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-Zweev9V959Z9dLtm .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-Zweev9V959Z9dLtm .edgeLabel text{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Zweev9V959Z9dLtm .node circle.state-start{fill:black;stroke:black}#mermaid-svg-Zweev9V959Z9dLtm .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-Zweev9V959Z9dLtm #statediagram-barbEnd{fill:#9370db}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-state .divider{stroke:#9370db}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-Zweev9V959Z9dLtm .note-edge{stroke-dasharray:5}#mermaid-svg-Zweev9V959Z9dLtm .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-Zweev9V959Z9dLtm .error-icon{fill:#522}#mermaid-svg-Zweev9V959Z9dLtm .error-text{fill:#522;stroke:#522}#mermaid-svg-Zweev9V959Z9dLtm .edge-thickness-normal{stroke-width:2px}#mermaid-svg-Zweev9V959Z9dLtm .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-Zweev9V959Z9dLtm .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-Zweev9V959Z9dLtm .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-Zweev9V959Z9dLtm .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-Zweev9V959Z9dLtm .marker{fill:#333}#mermaid-svg-Zweev9V959Z9dLtm .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-Zweev9V959Z9dLtm {
color: rgba(0, 0, 0, 0.75);
font: ;
}

回到微信主页
点击通讯录
点击字母A
点击A分组下的联系人
void Choose_Name(int8_t num)
{
	//点击5次返回图标,确保当前页面为微信主页,为了防止程序在微信中点错
	Move_To_Click(40,100);
	Move_To_Click(40,100);
	Move_To_Click(40,100);
	Move_To_Click(40,100);
	Move_To_Click(40,100);
	Move_To_Click(400,1740);//点击通讯录
	HAL_Delay(1000);//等待1s
	Move_To_Click(1050,410);//点击A
	HAL_Delay(1000);//等待1s
	Move_To_Click(200,num*133+350);//点击联系人名字 A0是350 A9是1550 均分1200/9=133
}

开始呼叫
这一步较简单。

#mermaid-svg-rG3OHrUrFxPvYlny .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-rG3OHrUrFxPvYlny .label text{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .node rect,#mermaid-svg-rG3OHrUrFxPvYlny .node circle,#mermaid-svg-rG3OHrUrFxPvYlny .node ellipse,#mermaid-svg-rG3OHrUrFxPvYlny .node polygon,#mermaid-svg-rG3OHrUrFxPvYlny .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-rG3OHrUrFxPvYlny .node .label{text-align:center;fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .node.clickable{cursor:pointer}#mermaid-svg-rG3OHrUrFxPvYlny .arrowheadPath{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-rG3OHrUrFxPvYlny .flowchart-link{stroke:#333;fill:none}#mermaid-svg-rG3OHrUrFxPvYlny .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-rG3OHrUrFxPvYlny .edgeLabel rect{opacity:0.9}#mermaid-svg-rG3OHrUrFxPvYlny .edgeLabel span{color:#333}#mermaid-svg-rG3OHrUrFxPvYlny .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-rG3OHrUrFxPvYlny .cluster text{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-rG3OHrUrFxPvYlny .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-rG3OHrUrFxPvYlny text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-rG3OHrUrFxPvYlny .actor-line{stroke:grey}#mermaid-svg-rG3OHrUrFxPvYlny .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-rG3OHrUrFxPvYlny .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-rG3OHrUrFxPvYlny #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-rG3OHrUrFxPvYlny .sequenceNumber{fill:#fff}#mermaid-svg-rG3OHrUrFxPvYlny #sequencenumber{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny #crosshead path{fill:#333;stroke:#333}#mermaid-svg-rG3OHrUrFxPvYlny .messageText{fill:#333;stroke:#333}#mermaid-svg-rG3OHrUrFxPvYlny .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-rG3OHrUrFxPvYlny .labelText,#mermaid-svg-rG3OHrUrFxPvYlny .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-rG3OHrUrFxPvYlny .loopText,#mermaid-svg-rG3OHrUrFxPvYlny .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-rG3OHrUrFxPvYlny .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-rG3OHrUrFxPvYlny .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-rG3OHrUrFxPvYlny .noteText,#mermaid-svg-rG3OHrUrFxPvYlny .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-rG3OHrUrFxPvYlny .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-rG3OHrUrFxPvYlny .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-rG3OHrUrFxPvYlny .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-rG3OHrUrFxPvYlny .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .section{stroke:none;opacity:0.2}#mermaid-svg-rG3OHrUrFxPvYlny .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-rG3OHrUrFxPvYlny .section2{fill:#fff400}#mermaid-svg-rG3OHrUrFxPvYlny .section1,#mermaid-svg-rG3OHrUrFxPvYlny .section3{fill:#fff;opacity:0.2}#mermaid-svg-rG3OHrUrFxPvYlny .sectionTitle0{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .sectionTitle1{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .sectionTitle2{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .sectionTitle3{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-rG3OHrUrFxPvYlny .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .grid path{stroke-width:0}#mermaid-svg-rG3OHrUrFxPvYlny .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-rG3OHrUrFxPvYlny .task{stroke-width:2}#mermaid-svg-rG3OHrUrFxPvYlny .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .taskText:not([font-size]){font-size:11px}#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-rG3OHrUrFxPvYlny .task.clickable{cursor:pointer}#mermaid-svg-rG3OHrUrFxPvYlny .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-rG3OHrUrFxPvYlny .taskText0,#mermaid-svg-rG3OHrUrFxPvYlny .taskText1,#mermaid-svg-rG3OHrUrFxPvYlny .taskText2,#mermaid-svg-rG3OHrUrFxPvYlny .taskText3{fill:#fff}#mermaid-svg-rG3OHrUrFxPvYlny .task0,#mermaid-svg-rG3OHrUrFxPvYlny .task1,#mermaid-svg-rG3OHrUrFxPvYlny .task2,#mermaid-svg-rG3OHrUrFxPvYlny .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutside0,#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutside2{fill:#000}#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutside1,#mermaid-svg-rG3OHrUrFxPvYlny .taskTextOutside3{fill:#000}#mermaid-svg-rG3OHrUrFxPvYlny .active0,#mermaid-svg-rG3OHrUrFxPvYlny .active1,#mermaid-svg-rG3OHrUrFxPvYlny .active2,#mermaid-svg-rG3OHrUrFxPvYlny .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-rG3OHrUrFxPvYlny .activeText0,#mermaid-svg-rG3OHrUrFxPvYlny .activeText1,#mermaid-svg-rG3OHrUrFxPvYlny .activeText2,#mermaid-svg-rG3OHrUrFxPvYlny .activeText3{fill:#000 !important}#mermaid-svg-rG3OHrUrFxPvYlny .done0,#mermaid-svg-rG3OHrUrFxPvYlny .done1,#mermaid-svg-rG3OHrUrFxPvYlny .done2,#mermaid-svg-rG3OHrUrFxPvYlny .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-rG3OHrUrFxPvYlny .doneText0,#mermaid-svg-rG3OHrUrFxPvYlny .doneText1,#mermaid-svg-rG3OHrUrFxPvYlny .doneText2,#mermaid-svg-rG3OHrUrFxPvYlny .doneText3{fill:#000 !important}#mermaid-svg-rG3OHrUrFxPvYlny .crit0,#mermaid-svg-rG3OHrUrFxPvYlny .crit1,#mermaid-svg-rG3OHrUrFxPvYlny .crit2,#mermaid-svg-rG3OHrUrFxPvYlny .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-rG3OHrUrFxPvYlny .activeCrit0,#mermaid-svg-rG3OHrUrFxPvYlny .activeCrit1,#mermaid-svg-rG3OHrUrFxPvYlny .activeCrit2,#mermaid-svg-rG3OHrUrFxPvYlny .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-rG3OHrUrFxPvYlny .doneCrit0,#mermaid-svg-rG3OHrUrFxPvYlny .doneCrit1,#mermaid-svg-rG3OHrUrFxPvYlny .doneCrit2,#mermaid-svg-rG3OHrUrFxPvYlny .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-rG3OHrUrFxPvYlny .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-rG3OHrUrFxPvYlny .milestoneText{font-style:italic}#mermaid-svg-rG3OHrUrFxPvYlny .doneCritText0,#mermaid-svg-rG3OHrUrFxPvYlny .doneCritText1,#mermaid-svg-rG3OHrUrFxPvYlny .doneCritText2,#mermaid-svg-rG3OHrUrFxPvYlny .doneCritText3{fill:#000 !important}#mermaid-svg-rG3OHrUrFxPvYlny .activeCritText0,#mermaid-svg-rG3OHrUrFxPvYlny .activeCritText1,#mermaid-svg-rG3OHrUrFxPvYlny .activeCritText2,#mermaid-svg-rG3OHrUrFxPvYlny .activeCritText3{fill:#000 !important}#mermaid-svg-rG3OHrUrFxPvYlny .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-rG3OHrUrFxPvYlny g.classGroup text .title{font-weight:bolder}#mermaid-svg-rG3OHrUrFxPvYlny g.clickable{cursor:pointer}#mermaid-svg-rG3OHrUrFxPvYlny g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-rG3OHrUrFxPvYlny g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-rG3OHrUrFxPvYlny .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-rG3OHrUrFxPvYlny .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-rG3OHrUrFxPvYlny .dashed-line{stroke-dasharray:3}#mermaid-svg-rG3OHrUrFxPvYlny #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny .commit-id,#mermaid-svg-rG3OHrUrFxPvYlny .commit-msg,#mermaid-svg-rG3OHrUrFxPvYlny .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-rG3OHrUrFxPvYlny g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-rG3OHrUrFxPvYlny g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-rG3OHrUrFxPvYlny g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-rG3OHrUrFxPvYlny .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-rG3OHrUrFxPvYlny .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-rG3OHrUrFxPvYlny .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-rG3OHrUrFxPvYlny .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-rG3OHrUrFxPvYlny .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-rG3OHrUrFxPvYlny .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-rG3OHrUrFxPvYlny .edgeLabel text{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-rG3OHrUrFxPvYlny .node circle.state-start{fill:black;stroke:black}#mermaid-svg-rG3OHrUrFxPvYlny .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-rG3OHrUrFxPvYlny #statediagram-barbEnd{fill:#9370db}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-state .divider{stroke:#9370db}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-rG3OHrUrFxPvYlny .note-edge{stroke-dasharray:5}#mermaid-svg-rG3OHrUrFxPvYlny .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-rG3OHrUrFxPvYlny .error-icon{fill:#522}#mermaid-svg-rG3OHrUrFxPvYlny .error-text{fill:#522;stroke:#522}#mermaid-svg-rG3OHrUrFxPvYlny .edge-thickness-normal{stroke-width:2px}#mermaid-svg-rG3OHrUrFxPvYlny .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-rG3OHrUrFxPvYlny .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-rG3OHrUrFxPvYlny .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-rG3OHrUrFxPvYlny .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-rG3OHrUrFxPvYlny .marker{fill:#333}#mermaid-svg-rG3OHrUrFxPvYlny .marker.cross{stroke:#333}

:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}
#mermaid-svg-rG3OHrUrFxPvYlny {
color: rgba(0, 0, 0, 0.75);
font: ;
}

点击音视频通话
点击视频通话
void Start_Call()
{
	Move_To_Click(550,1400);//点击音视频通话
	HAL_Delay(2000);//等待1s
	Move_To_Click(550,1460);//点击视频通话
} 

结束通话

void Stop_Call(void)
{
	Move_To_Click(550,1600);//挂电话 通话时会自动隐藏挂机按钮,这里点击后能显示按钮
	HAL_Delay(1000);//等待1s
	Move_To_Click(550,1600);//挂电话 通话时点击中间能挂电话
	Move_To_Click(350,1600);//挂电话 呼叫时点击左边能挂电话
}
/* USER CODE END 1 */

2.2 修改usb_device.h文件

对屏幕分辨率添加宏定义

/* USER CODE BEGIN INCLUDE */
#define PX_MAX 1080
#define PY_MAX 1920
/* USER CODE END INCLUDE */

对以上函数添加声明

/* USER CODE BEGIN FD */
void Set_Mouse(int8_t x,int8_t y,int8_t z,uint8_t L,uint8_t R,uint8_t M);
void Scroll(int8_t z);
void Move(int8_t x,int8_t y);
void Move_Reset(void);
void Move_To(int16_t x,int16_t y);
void Click_L(void);
void Click_R(void);
void Click_M(void);
void Move_To_Click(int16_t x,int16_t y);

void Unlock(void);
void Open_Wechat(void);
void Start_Call(void);
void Choose_Name(int8_t num);
void Stop_Call(void);

/* USER CODE END FD */

3 修改main.c文件

添加矩阵键盘扫描函数

/* USER CODE BEGIN 4 */
uint8_t Key_Scan(void)
{
	GPIO_InitTypeDef GPIO_InitStruct = {0};
	
	//前4个端口输出低电平
	HAL_GPIO_WritePin(GPIOB,GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6, GPIO_PIN_RESET);
	
	//前4个端口推挽输出
	GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
	GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
	GPIO_InitStruct.Pull = GPIO_NOPULL;
	GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
	HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
	
	//后4个端口上拉输入
	GPIO_InitStruct.Pin = GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
	GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
	GPIO_InitStruct.Pull = GPIO_PULLUP;
	HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
	HAL_Delay(10);
	if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_15)==GPIO_PIN_RESET)//读取第1行
	{
		HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET);
		//后4个端口推挽输出
		GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		//前4个端口上拉输入
		GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
		GPIO_InitStruct.Pull = GPIO_PULLUP;
		GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		HAL_Delay(10);
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_3)==GPIO_PIN_RESET)return 'A';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_4)==GPIO_PIN_RESET)return '3';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5)==GPIO_PIN_RESET)return '2';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_6)==GPIO_PIN_RESET)return '1';
	}
	if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_14)==GPIO_PIN_RESET)//读取第2行
	{
		HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET);
		//后4个端口推挽输出
		GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		//前4个端口上拉输入
		GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
		GPIO_InitStruct.Pull = GPIO_PULLUP;
		GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		HAL_Delay(10);
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_3)==GPIO_PIN_RESET)return 'B';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_4)==GPIO_PIN_RESET)return '6';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5)==GPIO_PIN_RESET)return '5';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_6)==GPIO_PIN_RESET)return '4';
	}
	if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_13)==GPIO_PIN_RESET)//读取第3行
	{
		HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET);
		//后4个端口推挽输出
		GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		//前4个端口上拉输入
		GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
		GPIO_InitStruct.Pull = GPIO_PULLUP;
		GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		HAL_Delay(10);
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_3)==GPIO_PIN_RESET)return 'C';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_4)==GPIO_PIN_RESET)return '9';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5)==GPIO_PIN_RESET)return '8';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_6)==GPIO_PIN_RESET)return '7';
	}
	if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_12)==GPIO_PIN_RESET)//读取第4行
	{
		HAL_GPIO_WritePin(GPIOB,GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15, GPIO_PIN_RESET);
		//后4个端口推挽输出
		GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		//前4个端口上拉输入
		GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
		GPIO_InitStruct.Pull = GPIO_PULLUP;
		GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
		HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
		HAL_Delay(10);
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_3)==GPIO_PIN_RESET)return 'D';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_4)==GPIO_PIN_RESET)return '#';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5)==GPIO_PIN_RESET)return '0';
		if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_6)==GPIO_PIN_RESET)return '*';
	}
	return 0;
}

添加USB OTG功能切换函数

static void USB_OTG_ON(void)//开启OTG功能
{
	USB_OTG_FLAG = 1;
	HAL_GPIO_WritePin(USB_ID_GPIO_Port, USB_ID_Pin, GPIO_PIN_SET);
	HAL_Delay(100);
	HAL_GPIO_WritePin(GPIOA,USB_VCC_Pin, GPIO_PIN_RESET);
	HAL_Delay(1000);
	HAL_GPIO_WritePin(USB_ID_GPIO_Port, USB_ID_Pin, GPIO_PIN_RESET);
	HAL_GPIO_WritePin(GPIOA,USB_VCC_Pin, GPIO_PIN_SET);
	HAL_Delay(1000);
	Move_Reset();
}

static void USB_OTG_OFF(void)//关闭OTG功能
{
	USB_OTG_FLAG = 0;
	HAL_GPIO_WritePin(USB_ID_GPIO_Port, USB_ID_Pin, GPIO_PIN_SET);
	HAL_Delay(100);
	HAL_GPIO_WritePin(GPIOA,USB_VCC_Pin, GPIO_PIN_RESET);
	HAL_Delay(1000);
	HAL_GPIO_WritePin(USB_ID_GPIO_Port, USB_ID_Pin, GPIO_PIN_SET);
	HAL_GPIO_WritePin(GPIOA,USB_VCC_Pin, GPIO_PIN_SET);
}

/* USER CODE END 4 */

声明USB OTG状态标志位变量

/* USER CODE BEGIN PV */
static uint8_t USB_OTG_FLAG=0; 
/* USER CODE END PV */

声明以上三个函数

/* USER CODE BEGIN PFP */
static void USB_OTG_ON(void);
static void USB_OTG_OFF(void);
uint8_t Key_Scan(void);
/* USER CODE END PFP */

编写主函数程序


/**
  * @brief  The application entry point.
  * @retval int
  */
int main(void)
{
	/* USER CODE BEGIN 1 */
	uint8_t key;
	uint16_t timeout_10ms;
	/* USER CODE END 1 */
	
	/* MCU Configuration--------------------------------------------------------*/
	
	/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
	HAL_Init();
	/* USER CODE BEGIN Init */
	
	/* USER CODE END Init */
	
	/* Configure the system clock */
	SystemClock_Config();
	
	/* USER CODE BEGIN SysInit */
	
	/* USER CODE END SysInit */
	
	/* Initialize all configured peripherals */
	MX_GPIO_Init();
	MX_USB_DEVICE_Init();
	/* USER CODE BEGIN 2 */
	USB_OTG_OFF();
	/* USER CODE END 2 */
	
	/* Infinite loop */
	/* USER CODE BEGIN WHILE */
	while(1)
	{ 
    /* USER CODE END WHILE */
		key = Key_Scan();
		if(key)
		{
			if(USB_OTG_FLAG==0)USB_OTG_ON(),timeout_10ms=6000;//60s未操作关闭OTG,进行手机充电
			switch(key)
			{
				case 'A':Unlock();		break;
				case 'B':Open_Wechat();	break;
				case 'C':Start_Call();	break;
				case 'D':Stop_Call();	break;
				case '0':Choose_Name(0);break;
				case '1':Choose_Name(1);break;
				case '2':Choose_Name(2);break;
				case '3':Choose_Name(3);break;
				case '4':Choose_Name(4);break;
				case '5':Choose_Name(5);break;
				case '6':Choose_Name(6);break;
				case '7':Choose_Name(7);break;
				case '8':Choose_Name(8);break;
				case '9':Choose_Name(9);break;
				case '*':Unlock();HAL_Delay(1000);Open_Wechat();break;
				case '#':Start_Call();break;
			}
		}
		if(USB_OTG_FLAG){if(timeout_10ms--)HAL_Delay(10);else USB_OTG_OFF();} 		
    /* USER CODE BEGIN 3 */
	}
  /* USER CODE END 3 */
}

四、结语

可编程鼠标的应用范围远不止此,还有许多实用场景,比如电视盒子一键收看节目、代替手机脚本完成自动化操作,将手机作为小电视一键收看等等,整个制作流程并不复杂,却开了先河。如有错误望批评指正,因春运期间快递停运没有接插件,只能焊接,外观不佳。更多场景和功能等待各位开发者们探索。

版权声明:本文为CSDN博主「简单|纯粹」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xhl9434826546/article/details/122765582

生成海报
点赞 0

简单|纯粹

我还没有学会写个人说明!

暂无评论

发表评论

相关推荐

音频数据的Flash读取与DAC的播放

一、Flash地址空间的数据读取 1.Flash简介 在 STM32 芯片内部有一个 FLASH 存储器,它主要用于存储代码,我们在电脑上编写好应用程序后,使用下载器把编译后的代码文件烧录到该内部

音频数据的Flash读取与DAC播放(精简)

一、创建STM32CUBEMX工程 芯片选择F103C8 配置定时器 打开外部时钟 配置时钟 配置PC13为output对应板子上的LED 设置堆栈大小为4K,导出 二、KEIL下的配置 将flash.c 和flash