怎么创建弹出式菜单_如何在不使用其他软件的情况下创建弹出式提醒

怎么创建弹出式菜单

怎么创建弹出式菜单

image

Most everyone needs to be reminded about something. Be it a daily task, recurring commitment, or a one time event – having a pop-up reminder on your computer can come in handy. While there are myriad tools available to handle this task, we outline a simple way you can do this with no additional software.

大多数人都需要被提醒一些事情。 无论是日常任务,重复执行的任务还是一次性事件-在计算机上弹出提示都可以派上用场。 尽管有许多工具可以处理此任务,但我们概述了一种无需其他软件即可完成此操作的简单方法。

我们的“技巧”与任务计划程序 (Our “Trick” vs. Task Scheduler)

While we have previous discussed how you can use Task Scheduler natively to create pop-up reminders, there are a few behavior quirks/limitations we aim to address with this alternate method.

前面我们讨论了如何在本地使用Task Scheduler创建弹出提醒时 ,我们打算用这种替代方法解决一些行为怪癖/限制。

  • Task Scheduler-generated pop-up dialogs, for the most part, appear under any open windows (with an entry made in the taskbar). While your work will not be interrupted in the slightest, this creates a problem if you are depending on the notice to grab your attention.

    Task Scheduler生成的弹出对话框大部分出现任何打开的窗口下(在任务栏中有一个条目)。 尽管您的工作不会丝毫中断,但是如果您依靠通知来引起您的注意,则会造成问题。

  • Our alternate method opens a window on top of your current windows, but does not steal the focus. So, for example, if you are typing an email when the pop-up is scheduled to to appear, the box will appear on top of your email with key presses still being sent to your editor.

    我们的另一种方法是在当前窗口的顶部打开一个窗口,但不会占用焦点。 因此,例如,如果您在计划显示弹出窗口时正在键入电子邮件,则该框将出现在电子邮件顶部,同时仍将按键发送给编辑器。

  • Task Scheduler generated pop-up dialogs require interaction to dismiss. Essentially, it will stay until you press the OK button.

    Task Scheduler生成的弹出对话框需要交互才能关闭。 从本质上讲,它将一直保留到您按下“确定”按钮为止。

    Our alternate method supports this in addition to allowing a timer which will dismiss the box after a predefined amount of time.

    除了允许使用计时器之外,我们的替代方法还支持此功能,该计时器将在预定义的时间后关闭盒子。

设置 (Setting It Up)

While this trick is an alternate method, we still use Windows Task Scheduler.

尽管此技巧是一种替代方法,但我们仍然使用Windows Task Scheduler。

image

The task should be set to ‘Run only when user is logged on’ with the ‘Hidden’ option unchecked.

在未选中“隐藏”选项的情况下,应将任务设置为“仅在用户登录后才运行”。

image

Set the schedule to run as appropriate.

设置时间表以使其适当运行。

image

The program to run is CMD.exe which is the Windows command line console shell with the first argument being ‘/C’ which will run the subsequent text in the shell and then terminate the console window.

要运行的程序是CMD.exe,它是Windows命令行控制台外壳,第一个参数为'/ C',它将在外壳中运行后续文本,然后终止控制台窗口。

image

The magic here is in the arguments box (after the aforementioned ‘/C’ switch) which reads (note – while this displayed on several lines below, all of this text is a single contiguous line in the arguments box):

这里的魔力在自变量框中(在前面提到的“ / C”开关之后),其内容为(请注意,尽管此文本显示在下面的几行中,但所有这些文本在自变量框中都是连续的一行):

TITLE Read How-To Geek Reminder&ECHO.&ECHO.&ECHO It is currently %TIME%
&ECHO.&ECHO.&ECHO Time to go read How-To Geek.
&ECHO https://www.howtogeek.com&ECHO.&ECHO.&TIMEOUT 120

The ampersand (&) character allows you to chain together commands on a single line which makes the above equivalent to the following sequence:

&字符允许您在一行上将命令链接在一起,从而使以上内容等效于以下顺序:

TITLE Read How-To Geek Reminder
ECHO.
ECHO.
ECHO It is currently %TIME%
ECHO.
ECHO.
ECHO Time to go read How-To Geek.
ECHO https://www.howtogeek.com
ECHO.
ECHO.
TIMEOUT 120

The commands above could be put into a batch script and then have the scheduled task set to run the respective program/script instead to achieve the exact same result (although in a batch script, you would want to insert @ECHO OFF as the first command).

可以将上面的命令放入批处理脚本中,然后将排定的任务集设置为运行相应的程序/脚本,从而获得完全相同的结果(尽管在批处理脚本中,您希望将@ECHO OFF作为第一个命令插入)。

The message can be customized as needed and to understand exactly how the message is generated, consider the following keywords:

可以根据需要自定义消息,并且要完全了解消息的生成方式,请考虑以下关键字:

  • TITLE changes the console window name to the subsequent text.

    TITLE将控制台窗口名称更改为后续文本。
  • ECHO prints the subsequent text to the console window. When a dot immediately follows the ECHO command, a blank line is printed.

    ECHO将后续文本打印到控制台窗口。 当一个点紧跟在ECHO命令之后时,将打印一个空行。
  • %TIME% is an environment variable which is replaced with the current system time (in 24-hour format).

    %TIME%是一个环境变量,将其替换为当前系统时间(24小时制)。
  • TIMEOUT <N> tells the console to wait N number or seconds to continue or until a key press is made (whichever comes first). If you wanted to force the window to wait until a key press is made (i.e. no countdown), then enter -1 as the value for N.

    TIMEOUT <N>告诉控制台等待N个数字或几秒钟以继续,或者直到按键为止(以先到者为准)。 如果您想强制窗口等待直到按键(即不倒数),则输入-1作为N的值。

Of course, you are not limited to only the commands above – you have the entire command line arsenal of keywords at your disposal which can, for example, have your reminders open programs and/or launch websites as part of the process.

当然,您不仅限于上面的命令-您可以使用整个命令行关键字库,例如,可以在过程中让提醒打开程序和/或启动网站。

翻译自: https://www.howtogeek.com/136894/how-to-create-popup-reminders-with-no-additional-software/

怎么创建弹出式菜单

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值