0
点赞
收藏
分享

微信扫一扫

【AHK】仿Obsidian插件Natural Language Dates实现快速生成日期相关链接


这几个热字串是辅助输入时间的,有点像 Natural Language Dates
只是用ahk实现的,只是个演示,意义在于自己可以用ahk灵活扩展自己的想要的

使用方法是 输入热字串后按tab键,比如 today 之后tab键,会生成 [[2021-12-07_周二]]
d+1之后tab键,会生[[2021-12-08_周三]],tomorrow之后tab键,也会生[[2021-12-08_周三]]。

; 今天
:*:d0`t::
:*:today`t::
FormatTime, targetDate,, yyyy-MM-dd_ddd
SendInput [[%targetDate%]]
return

; 明天
:*:d+1`t::
:*:tomorrow`t::
formattime,today,,yyyyMMdd
EnvAdd,today,+1,days
FormatTime, targetDate,%today%, yyyy-MM-dd_ddd
SendInput [[%targetDate%]]
return

; 昨天
:*:d-1`t::
:*:yesterday`t::
formattime,today,,yyyyMMdd
EnvAdd,today,-1,days
FormatTime, targetDate,%today%, yyyy-MM-dd_ddd
SendInput [[%targetDate%]]
return

;下周
:*:d+7`t::
:*:nextweek`t::
formattime,today,,yyyyMMdd
EnvAdd,today,+7,days
FormatTime, targetDate,%today%, yyyy-MM-dd_ddd
SendInput [[%targetDate%]]
return


举报

相关推荐

0 条评论