windows - Autohotkey - 发送 ctrl+ 以在 Windows 文件资源管理器中自动调整列宽
问题描述
使用 Autohotkey,我想将“ctrl+”发送到文件资源管理器,以自动调整列宽。
手动,它是 ctrl+(小键盘中的 +)。
下面的代码有效,但仅适用于一级文件夹,如果我在文件夹中打开文件夹则无效。
有没有办法为我可能打开的每个子文件夹再次发送“ctrl+”?
Gui, +LastFound
DllCall("RegisterShellHookWindow", UInt, WinExist())
MsgNum := DllCall("RegisterWindowMessage", Str, "SHELLHOOK")
OnMessage(MsgNum, "ShellMessage")
Return
ShellMessage(wParam, lParam) {
wTitle = ahk_id %lParam%
WinGet, pname, ProcessName, %wTitle%
If (wParam != 1 || pname != "Explorer.exe")
Return
WinActivate, %wTitle%
Send ^{NumpadAdd} ;ctrl+ (numpad)
}
解决方案
推荐阅读
- reactjs - 如何自定义 Highcharts.js 中的条形宽度和条形间距
- javascript - WebAudio API:如何在 AudioWorkletProcessor 中访问时间/采样率?
- chart.js - 无法在图表 js 注释插件中旋转标签
- javascript - 节点js中的击键输入键发送
- c# - 错误:“System.InvalidOperationException:无法找到所需的服务。”如何解决?
- mongodb - 如何在 websphere 中为 mongodb 创建数据源
- html - 媒体查询在电子邮件模板中不起作用
- c# - 如何在 Xamarin Form Android Visual Studio 2019 中设计六边形
- security - 如何解决 Jenkins 中的跨站脚本 (XSS) 漏洞
- php - 如何在 Laravel 中使用 COM 类