易语言监视热键_创建快捷方式或热键以关闭监视器

时间:2024-04-11 19:50:54
易语言监视热键_创建快捷方式或热键以关闭监视器

易语言监视热键

Have you ever wanted to hit a shortcut key to turn off the monitor? Sure, you can use the Win+L combination to lock the screen, but that leaves your monitor on… and those of us with multiple monitors find it a pain to hunt down the power buttons all the time.

您是否曾经想过按下快捷键来关闭显示器? 当然,您可以使用Win + L组合来锁定屏幕,但这会使您的显示器保持打开状态……而我们这些拥有多台显示器的人发现,一直在寻找电源按钮很麻烦。

易语言监视热键_创建快捷方式或热键以关闭监视器

First we’ll show you how to simply power off the monitor, and then how to both lock and power it off.

首先,我们将向您展示如何简单地关闭显示器电源,然后如何锁定和关闭电源。

创建快捷方式以关闭监视器 (Create a Shortcut to Turn Off the Monitor)

To create this shortcut, we’ll first need to grab a tiny multi-purpose utility called NirCmd from the great folks over at NirSoft. This Swiss-army knife tool can do an amazing array of tasks, including powering off the monitor. All we really need to do is create a shortcut to it.

要创建此快捷方式,我们首先需要从NirSoft的老手那里获取一个名为NirCmd微型多功能实用程序。 这款瑞士军刀工具可以完成许多任务,包括关闭显示器电源。 我们真正需要做的就是为其创建一个快捷方式。

Right-click anywhere on the desktop and choose New \ Shortcut:

右键单击桌面上的任意位置,然后选择“新建\快捷方式”:

易语言监视热键_创建快捷方式或热键以关闭监视器

Then you’ll want to browse to the location where you saved the nircmd.exe file, and add the following arguments:

然后,您将需要浏览至保存nircmd.exe文件的位置,并添加以下参数:

“C:\path\to\nircmd.exe” cmdwait 1000 monitor off

“ C:\ path \ to \ nircmd.exe” cmdwait 1000监视器关闭

Make sure the path has quotes around it, and then you add the extra arguments, which will wait 1 second before powering off the monitor (otherwise Windows might misinterpret your last keystroke and wake back up).

确保路径周围有引号,然后添加额外的参数,该参数将在关闭显示器电源之前等待1秒钟(否则Windows可能会误解您的上一次击键并唤醒)。

易语言监视热键_创建快捷方式或热键以关闭监视器

Next you can go into the shortcut properties and assign a shortcut key, and then click Change Icon to pick a better one than the default.

接下来,您可以进入快捷方式属性并分配一个快捷键,然后单击“更改图标”以选择比默认设置更好的一个。

易语言监视热键_创建快捷方式或热键以关闭监视器

In Vista, at least, there’s a great icon for turning off the monitor… pick the somewhat ugly one from the list below:

至少在Vista中,有一个很棒的图标可以关闭显示器……从下面的列表中选择一个难看的图标:

易语言监视热键_创建快捷方式或热键以关闭监视器

And when the icon actually shows up, it’s nice and shiny. Of course you are free to pick your own icon instead.

当该图标实际显示时,它既漂亮又有光泽。 当然,您可以*选择自己的图标。

易语言监视热键_创建快捷方式或热键以关闭监视器

太锁定工作站 (Lock the Workstation Too)

For extra credit, you can create a shortcut that both locks the workstation as well as turns the monitor off. Unfortunately the Nircmd way involves more steps than necessary in Vista (in my testing, at least), so I’ve created a tiny executable called LockAndPowerDown.exe that will do both in one step.

要获得额外的荣誉,您可以创建快捷方式,该快捷方式既可以锁定工作站,也可以关闭显示器。 不幸的是,Nircmd方式涉及的步骤比Vista中所需的步骤多(至少在我的测试中),因此,我创建了一个名为LockAndPowerDown.exe的小型可执行文件,它将一步完成这两个步骤。

易语言监视热键_创建快捷方式或热键以关闭监视器

To install it, simply download and extract the executable, and create a shortcut to it just as you did in the step above. To find the same icon, click on Change Icon, and then paste in “C:\Windows\System32\shell32.dll” into the browse box.

要安装它,只需下载并解压缩可执行文件,然后按照上面的步骤创建它的快捷方式即可。 要找到相同的图标,请单击“更改图标”,然后将“ C:\ Windows \ System32 \ shell32.dll”粘贴到浏览框中。

易语言监视热键_创建快捷方式或热键以关闭监视器

The application is written in AutoHotkey and the source code is included in the download file. Enjoy!

该应用程序使用AutoHotkey编写,并且源代码包含在下载文件中。 请享用!

翻译自: https://www.howtogeek.com/howto/windows-vista/create-a-shortcut-or-hotkey-to-turn-off-the-monitor/

易语言监视热键