Most smartphones have a feature in which you can double tap the spacebar to insert a period. Wouldn’t it be nice if you could do that on your Windows PC too? We’ll show you how you can.

大多数智能手机都有一项功能,您可以双击空格键以插入句点。 如果您也可以在Windows PC上做到这一点,这不是很好吗? 我们将向您展示如何做到。

We’re going to create an AutoHotkey script to insert a period followed by a space when you double tap on the space bar. AutoHotkey is a free, open-source program that allows you to automate repetitive tasks in Windows. It uses a scripting language that was originally designed to create keyboard shortcuts, or hotkeys, but it evolved into a scripting language that allows you to automate almost anything—no programming knowledge required.

我们将创建一个AutoHotkey脚本,当您在空格键上双击时插入一个句点,后跟一个空格。 AutoHotkey是一个免费的开放源代码程序,可让您在Windows中自动执行重复性任务。 它使用一种脚本语言,该脚本语言最初旨在创建键盘快捷键或热键,但后来演变为一种脚本语言,使您几乎可以自动化所有内容,而无需编程知识。

If you’re curious, check out our beginner’s guide to AutoHotkey to learn more about it. But even if you’ve never used it before, you should be able to follow the steps below easily.

如果您好奇,请查看我们的AutoHotkey初学者指南以了解更多信息。 但是,即使您以前从未使用过它,也应该可以轻松地遵循以下步骤。

Download AutoHotkey, install it using the Express Installation, and restart your PC. Then, right-click on any empty area of the desktop and go to New > AutoHotkey Script.

下载AutoHotkey ,使用快速安装进行安装,然后重新启动PC。 然后,右键单击桌面上的任何空白区域,然后转到“新建”>“ AutoHotkey脚本”。

A file with the extension .ahk is created on your desktop. Rename the file, making sure to keep the .ahk extension. You can also move it wherever you want on your PC—put it in a safe place, because you’ll need to keep the script as long as you want this feature.

在您的桌面上创建扩展名为.ahk的文件。 重命名文件,确保保留.ahk扩展名。 您还可以将其移动到PC上的任何位置,将其放在安全的地方,因为只要需要此功能,就需要保留脚本。

Then, right-click on the file and select “Edit Script” from the popup menu.

然后,右键单击该文件,然后从弹出菜单中选择“编辑脚本”。

We will use what’s called a “hotstring” to replace two spaces with a period followed by a space. This will work in any program, any time you type two spaces.

我们将使用所谓的“ hotstring”将两个空格替换为一个句点,后跟一个空格。 每当您键入两个空格时,该命令均可在任何程序中使用。

When you select Edit Script, the script file you created opens in the default text editor, which in our case is Notepad. There are some lines automatically added to the beginning of the file. Put the cursor at the end and add the following text on a new line. You can just copy and paste the text.

选择“编辑脚本”后,创建的脚本文件将在默认文本编辑器(在我们的情况下为记事本)中打开。 有些行自动添加到文件的开头。 将光标放在末尾,然后在新行中添加以下文本。 您可以只复制并粘贴文本。

:*:  ::{NumpadDot}{space}

Here’s what this line does:

这行的内容如下:

  • The asterisk (*) between the first pair of colons is an option that indicates an ending character is not required. This means that as soon as you type two spaces, they will be replaced by a period followed by a space.

    第一对冒号之间的星号( * )是一个选项,指示不需要结尾字符。 这意味着,一旦您键入两个空格,它们就会被句号后跟一个空格所代替。

  • There are two spaces between the next pair of colons. This indicates what you type to insert the replacement text.下一对冒号之间有两个空格。 这表明您键入要插入替换文本的内容。
  • The pair of colons after the two spaces is just a divider between the activating action (the two spaces) and what the action executes (replacing the two spaces with a period and a space).两个空格后面的一对冒号只是激活动作(两个空格)和动作执行内容(用句点和空格替换两个空格)之间的分隔线。
  • The items in brackets after the last colon are the characters that will replace the two spaces.最后一个冒号后面方括号中的项目是将替换两个空格的字符。

Press Ctrl+S to save the script file and then click the “X” button in the upper-right corner of the window to close the text editor.

按Ctrl + S保存脚本文件,然后单击窗口右上角的“ X”按钮以关闭文本编辑器。

Double-click on the script file to run the script.

双击脚本文件以运行脚本。

Now, in any program where you can type text, such as text editors, word processors, and browsers, you can double-tap the space bar to type a period and a space. You may have to test the speed at which you need to double-tap the space bar for this to work.

现在,在任何可以键入文本的程序中,例如文本编辑器,文字处理器和浏览器,都可以点按两次空格键以键入句点和空格。 您可能需要测试双击空格键才能使其正常工作的速度。

You can edit the script at any time by right-clicking on the script file and selecting Edit Script, just like when you first created the script. You can also edit the script by right-clicking the AutoHotkey icon in the system tray and selecting “Edit This Script” from the popup menu. If you change the script, or add additional actions to it, use the “Reload This Script” option on the popup menu on the system tray icon to run the revised script without having to exit and re-run the script.

您可以随时通过右键单击脚本文件并选择“编辑脚本”来编辑脚本,就像您首次创建脚本一样。 您还可以通过右键单击系统任务栏中的AutoHotkey图标并从弹出菜单中选择“编辑此脚本”来编辑脚本。 如果更改脚本或对其添加其他操作,请使用系统任务栏图标弹出菜单上的“重新加载此脚本”选项来运行修改后的脚本,而不必退出并重新运行该脚本。

If you want your AutoHotkey script to run automatically when Windows starts, you can create a shortcut and put that shortcut in the Startup folder. Right-click on the .ahk script file and select “Create shortcut” from the popup menu.

如果希望Windows启动时自动运行 AutoHotkey脚本,则可以创建一个快捷方式并将该快捷方式放入“启动”文件夹中。 右键单击.ahk脚本文件,然后从弹出菜单中选择“创建快捷方式”。

Select the new shortcut and press Ctrl+C to copy it.

选择新的快捷方式,然后按Ctrl + C进行复制。

Press Windows+R on your keyboard to open the Run dialog box, type shell:startup in the Open box, and click “OK” to open the Startup folder.

在键盘上按Windows + R打开“运行”对话框,在“打开”框中键入shell:startup ,然后单击“确定”以打开“启动”文件夹。

NOTE: When you add a shortcut to the shell:startup folder, it will only launch when you are logged into the current account. If you want the shortcut to launch whenever any user logs in, type shell:common startup in the Open box on the Run dialog box.

注意:将快捷方式添加到shell:startup文件夹时,仅当您登录到当前帐户时,它才会启动。 如果希望在任何用户登录时启动快捷方式,请在“运行”对话框的“打开”框中键入shell:common startup

Press Ctrl+V to paste the shortcut into the Startup folder. Now, your AutoHotkey script will always run when Windows starts and you’ll be able to type two spaces to insert a period followed by a space.

按Ctrl + V将快捷方式粘贴到“启动”文件夹中。 现在,您的AutoHotkey脚本将始终在Windows启动时运行,并且您将能够键入两个空格以在句号后插入一个空格。

Again, to learn more about using scripts in Windows with AutoHotkey, read our beginner’s guide to using an AutoHotkey script.

同样,要了解有关在Windows中将脚本与AutoHotkey结合使用的更多信息,请阅读有关使用AutoHotkey脚本的初学者指南 。

翻译自: https://www.howtogeek.com/289862/how-to-automatically-type-a-period-with-a-double-space-in-windows/

如何在Windows中自动键入带双倍空格的句点相关推荐

  1. 如何在Windows中安装Python?

    如何在Windows中安装Python? 1. Python的安装 官网下载:https://www.python.org/downloads/windows/ 点开上面的链接,会发现有很多版本. 首 ...

  2. HTML如何实现单元格自动编号,如何在Excel中自动为列编号?

    如何在Excel中自动为列编号? 您是否曾经想过在Excel中对列进行编号? 本教程将讨论一些对列进行编号的方法. 通过公式= ROW()自动编号​​一列 如果要根据行号对列进行编号,可以键入此公式 ...

  3. 禁用键盘快捷键_如何在Windows中使用键盘快捷键临时禁用键盘

    禁用键盘快捷键 If you've got a pet or small child, you know that an unguarded keyboard can spell disaster-o ...

  4. 如何在Excel中自动创建报告 Excel中自动创建报告的方法

    如何在Excel中自动创建报告 Excel中自动创建报告的方法,Excel工作表中存储的数据,可以使用宏来一键创建报告并导出为不同的文件类型.Excel自带步骤记录器,因此你不需要自己编写宏.小编在这 ...

  5. 永中word页码怎么从第二页开始_办公软件操作技巧087:如何在word中自动生成目录并同步更新目录...

    在日常工作中,我们用word编辑长篇文档比如论文时,要在正文前面插入目录,如下图,如果是在首页手动编制目录,后期调整文档内容时,目录与正文会不同步,更新起来就比较麻烦,那么这种情况该怎么办呢? 带目录 ...

  6. 好系统教你如何在Windows中更改文件夹的图标

    如何在Windows中更改文件夹的图标 浏览到要更改其图标的文件夹的位置,或创建一个新文件夹. 右键单击该文件夹,然后从出现的下拉菜单底部选择"属性". 在文件夹属性菜单中,选择自 ...

  7. 如何在Windows中的命令提示符下删除特定目录中的文件/子文件夹

    本文翻译自:How to delete files/subfolders in a specific directory at the command prompt in Windows Say, t ...

  8. cmd查看php服务器,如何在windows中查看php版本

    如何在windows中查看php版本 发布时间:2020-06-25 15:19:17 来源:亿速云 阅读:155 作者:Leah 如何在windows中查看php版本?针对这个问题,这篇文章详细介绍 ...

  9. 如何在windows中添加smb共享

    如何在windows中添加smb共享 打开我的电脑 然后在电脑名字上点击鼠标右键,选择映射网络驱动器 打开后界面如图,输入开启smb共享的位置 打开我的电脑 在新版的操作系统中可能叫做这台电脑,打开后 ...

  10. 如何在Windows中修改您的名字和公司名?

    如何在Windows中修改您的名字和公司名? 安装Windows时,安装程序会提示输入注册用户的名字,所在公司等信息.安装完毕后,这些信息可以通过在打开我的电脑的" 属性"对话框中 ...

最新文章

  1. 局部变量 final Java_Java局部变量final
  2. vue + axios---封装一个http请求
  3. go 调用winapi_golang 调用windows API 中文的处理
  4. 安全用电基本知识,弱电工程人员要学会!
  5. linux 权限之所有者所属组
  6. 如何让div在整个页面中居中?
  7. TCP/IP之路由算法
  8. matlab处理hdf5数据画图,读取行的最佳HDF5数据集块形状
  9. 新概念英语第一册1-144课(转)
  10. **无人机水平方向四环串级控制,竖直方向三环串级控制
  11. Excel如何将二维表转成数据列
  12. 数字图像分辨率的认识
  13. OA性能调优方案(一)
  14. My97DatePicker时间控件在asp.net的应用
  15. 【Salesforce】地理位置情報項目を使って周辺検索 GMaps
  16. android技术交流群 付费群,QQ群付费入群功能停止服务是怎么回事?QQ付费入群功能停止服务详情一览[多图]...
  17. 实现了私聊和群聊功能的聊天工具
  18. 8大基本数据类型各占多少字节和一些单位常识
  19. 普通商品期货手机开户流程
  20. java实现生成二维码及扫码登录

热门文章

  1. 矩阵的内涵! 对于逆矩阵的物理含义有帮助!
  2. 【c++笔记(三)侯捷老师课程】栈,堆与内存管理
  3. 读懂Json文件[妈妈再也不用担心我读不懂了]
  4. 波卡平行链拍卖在即,有哪些未上线的项目值得期待
  5. 软件工程的建模软件_领域建模| 软件工程
  6. 【数据治理】WKC+Minio+Airflow --20230821(链接)
  7. 秋季预防呼吸道疾病“六提醒”
  8. Latex中插入Visio图片-图片转换,消除空白
  9. 金融 java招聘信息系统_[杭州][蚂蚁金服]招聘金融系统 Java 开发工程师/技术专家...
  10. 3dmax做的屋顶种植园