gpt4 book ai didi

autohotkey - 如何在不单击“确定”的情况下使AutoHotkey消息框消失?

转载 作者:行者123 更新时间:2023-12-04 16:39:55 28 4
gpt4 key购买 nike

我需要在脚本中显示类似msgbox的内容,而无需等待单击确定。

我需要在特定时间段内显示一个字符串,然后使其消失。如果它可以显示实时计时器字符串但不是必需的,则将很有帮助。

就像是:

...
msgbox, MyInformationString; display information
sleep, 30000 ; wait 30 seconds
; close msgbox but HOW ???
...

不必是msgbox命令。但我不知道如何创建新的弹出窗口或任何其他显示信息的方式。格式是我最不关心的地方。

最佳答案

查看docs中的msgbox。由于您是通过AutoHotkey生成msgbox的,因此可以对其设置时间限制,以自动关闭消息。这意味着您不必推任何东西-出现该框,然后就消失了。

MsgBox [, Options, Title, Text, Timeout]
Timeout是最后一个参数:

(optional) Timeout in seconds, which can contain a decimal point but is not an expression by default. In v1.1.06+, this can be a forced expression such as % mins*60.

If this value exceeds 2147483 (24.8 days), it will be set to 2147483. After the timeout has elapsed the message box will be automatically closed and the IfMsgBox command will see the value TIMEOUT.

Known limitation: If the MsgBox contains only an OK button, IfMsgBox will think that the OK button was pressed if the MsgBox times out while its own thread is interrupted by another.

关于autohotkey - 如何在不单击“确定”的情况下使AutoHotkey消息框消失?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17516587/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com