欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

键盘忍者:使用单个热键弹出Vista日历

发布时间:2023/12/6 编程问答 55 豆豆
生活随笔 收集整理的这篇文章主要介绍了 键盘忍者:使用单个热键弹出Vista日历 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

We’ve covered how to access the Windows Vista Calendar using the keyboard, but what if you wanted to assign a single keystroke to pop up the calendar? Yeah, sure, you can just click it with the mouse, but where’s the geek fun in that?

我们已经介绍了如何使用键盘访问Windows Vista日历,但是如果您想分配一个按键来弹出日历怎么办? 是的,当然,您可以用鼠标单击它,但是其中的怪胎乐趣在哪里?

In case you aren’t sure what we’re talking about, you can use Win+B, then Left, then Enter to pop up this calendar with the keyboard (or you can just click once on the clock). But we can get that down to a single keystroke with an AutoHotkey script.

如果您不确定我们在说什么,可以使用Win + B,然后按Left,然后按Enter来使用键盘弹出该日历(或者您可以单击时钟一次)。 但是我们可以使用AutoHotkey脚本将其简化为单个击键。

Note: I came up with this idea after reading an article from Digital Inspiration about launching timedate.cpl with a shortcut.

注意:在阅读Digital Inspiration中有关使用快捷方式启动timedate.cpl的文章后,我想到了这个想法。

Using the AutoHotkey Script

使用AutoHotkey脚本

In order to use this script, you’ll need to have AutoHotkey installed. If you’d rather not do that, there’s a compiled version further down.

为了使用此脚本,您需要安装AutoHotkey 。 如果您不愿意这样做,则还有一个编译后的版本。

What we’ll do is assign the F12 key to send the keystrokes instead of having to do them manually. Create a new file named something.ahk and then paste in the following:

我们要做的是分配F12键来发送击键,而不必手动进行。 创建一个名为something.ahk的新文件,然后粘贴以下内容:

#InstallKeybdHook#Persistent#HotkeyInterval,100SetKeyDelay, -1

#InstallKeybdHook#Persistent#HotkeyInterval,100SetKeyDelay,-1

f12::{send, {lwin down}b{lwin up}sleep 10send, {left}sleep 10send, {enter}Return}

f12 :: {发送,{lwin向下} b {lwin向上}Hibernate10发送,{left}Hibernate10发送,{enter}返回}

Save the file, and now you can double-click on it to launch it.

保存文件,现在您可以双击它来启动它。

At this point you can use the F12 key to pop open the calendar. If you want to close the script out, there’s an icon in the system tray.

此时,您可以使用F12键弹出日历。 如果要关闭脚本,则系统托盘中会有一个图标。

Note: You can substitute another key instead of F12 if you want. You could also add #NoTrayIcon to keep it from putting an icon into the system tray.

注意:如果需要,可以用其他键代替F12。 您还可以添加#NoTrayIcon,以防止其将图标放入系统托盘中。

Using the Compiled Application

使用编译的应用程序

I’ve included a compiled .exe version of the script in the download that you can run if you don’t have AutoHotkey installed. Just double-click on VistaCalendarHotkey.exe to run it.

如果未安装AutoHotkey,则在下载文件中包含脚本的已编译.exe版本。 只需双击VistaCalendarHotkey.exe即可运行它。

Download VistaCalendarHotkey AutoHotkey Script/Application

下载VistaCalendarHotkey AutoHotkey脚本/应用程序

翻译自: https://www.howtogeek.com/howto/windows-vista/keyboard-ninja-pop-up-the-vista-calendar-with-a-single-hotkey/

总结

以上是生活随笔为你收集整理的键盘忍者:使用单个热键弹出Vista日历的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。