autohotkey - 优化自动热键代码/发送键盘代码
问题描述
我对 AutoHotkey 的功能印象深刻。如何优化该代码?我需要知道什么?
SetTitleMatchMode RegEx ;
::/act1::
Send {LControl down}
Send {LShift down}
Send {m}
Send {LControl up}
Send {LShift up}
Send {Left 3}
Send {LShift down}
Send {Home}
Send {LShift up}
Send {LControl down}
Send {c}
Send {LControl up}
WinActivate WidnowA
Send {LControl down}
Send {Home}
Send {LControl up}
Send {Down 1}
Send {Right 12}
Send {LControl down}+{v}
Send {LControl up}
Send {,}
Send {Space}
Send {LControl down}
Send {s}
Send {LControl up}
CoordMode, Mouse, Screen
x := 150
y := 1420
Click %x% %Y%
Send {Right 3}
return
我认为不需要描述这些部分,但是..我可以用另一种(最简单的)方式来写吗?
谢谢
解决方案
我认为这里没有太多优化空间,因为没有太多重复。如果您使用了相同系列的击键,则可以使用函数减少重复。但是,您似乎在“WinActivate WidnowA”处有错字
一种可能的改进是将您对“Send”的使用更改为“ SendInput ”,这“通常更快、更可靠”。
推荐阅读
- mongodb - 为什么 Jackrabbit 全文查询不起作用?
- perl - 初始化给定长度的空哈希数组 - 单行
- c++ - char 中只有一位数字
- java - 房间 LocalDateTime 类型转换器
- html - 为什么 iOS 10 上的 min-height 100vh 会导致大窗口?
- php - 根据所选付款方式显示隐藏自定义 Woocommerce 结帐字段
- perl - Perl Net::SSH2::Cisco 发送 cmd() 到交换机时读取超时
- xamarin - 使用 Xamarin Forms 停止列表视图上的重复名称
- sql - SQL - 如果一个插入行不正确,则 SQL 语句已终止
- c# - 如何选择然后拆分数据然后选择第二个数据?