电脑小妙招

注:Windows版本:10+

Microsoft edge使用新版

python3.7,使用uiautomation

1.edge手势

如果你使用的是edge浏览器,那么手势可以增加你的使用效率,让你快速进行页面操作。

edge用户从这里:

edge://settings/mouseGesture

可以看到鼠标手势的配置。

像这样:

2.u模式输入和v模式输入 

比如:

(撇+竖)

(木字旁+卯)

(单位)

比如:

(698) 

(2016.8.9)

(6⁶+9986)

3.python微信消息关键字式自动回复

不建议过多使用、不建议回复长内容,有封号风险

from uiautomation import WindowControl
keyword_answers = [
    ("sb", "你也是"),
    ("名字", "Elan"),
    ("岁", "13"),
]
wx = WindowControl(Name='微信', searchDepth=1)
wx.SwitchToThisWindow()
hw = wx.ListControl(Name='会话')


def find_chapter_page(query):
    for keyword, answer in keyword_answers:
        if keyword in query:
            return answer
    return "听不懂思密达"

while True:
    we = hw.TextControl(searchDepth=4)
    while not we.Exists():
        pass
    if we.Name:
        we.Click(simulateMove=False)
        last_msg = wx.ListControl(Name='消息').GetChildren()[-1].Name
        response = find_chapter_page(last_msg)
        wx.SendKeys(response, waitTime=5)
        wx.SendKeys('{Enter}', waitTime=1)
        wx.TextControl(SubName=last_msg[:5]).Click()

代码比较简单,不做过多介绍,不会的评论区提问。

效果:

  • 14
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Elanx4

感谢支持!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值