type
status
date
slug
summary
tags
category
icon
password

使用自动操作实现Mac快速插入当前日期和时间

😀
这里写文章的前言:
经常记笔记,想把当前记录的时间也写上。但是每次都要手打,很烦
今天有空搜索了一下如何自动插入当前时间在MacBook上,发现是有解决办法,于是就尝试了一下。
主要借助 macOS 的 Automator 和 Keyboard shortcuts
 

📝 How to insert current date and time using shortcuts on macOS

How to insert current date and time using shortcuts on macOS

1 Automator

1.1 open Automator

notion image

1.2 Choose ‘Quick Action’

notion image

1.3 add variables

Variables ->  Date & Time -> Today’s date
Variables ->  Date & Time -> Current time
notion image
Click here, you can change format
notion image

1.4 add actions

notion image
Actions -> Utilities -> Get Value of Variable
Actions -> Utilities -> Copy to Clipboard
You must set Workflow receives as no input, or else later it doesn’t work when using keyboard shortcuts
You can change the Variable
You can click the Run button on the right up corner to test whether it works.

1.5 save actions

notion image
Press cmd + s to save the file, name it, the name will be used after.
Next, we’ll set keyboard shortcuts

2. keyboard shortcuts

2.1 Open setting for keyboard shortcuts

notion image

2.2 set shortcuts for actions

notion image
Services -> General
Set shortcuts for these quick actions
Click done, then you can use it through shortcuts, try it!

📎 参考文章

 
海边的卡夫卡Hello World!