gpt4 book ai didi

autohotkey - 如何在 AutoHotkey 中添加等待期?

转载 作者:行者123 更新时间:2023-12-04 19:08:46 30 4
gpt4 key购买 nike

我有这个游戏脚本

~Rbutton & M:: SendInput t You have the right to remain silent. Anything you say can and will be used against you in the Supreme Court of San Andreas, 2nd District.{enter} t As by the laws of San Andreas,you have the right to speak to an attorney.{enter} t If you cannot afford an attorney, one will be appointed for you.{enter} t Do you understand these rights as they have been read to you?{enter}



我希望我的脚本在每个 enter 后等待 2 秒在发送下一行之前。我怎样才能做到这一点?

最佳答案

如果您要发送制表符,则需要更改您的 t `t
因此,将热键的代码更改为一个块而不是一行(通过不要将命令全部放在一行上,并在其末尾添加 return 来实现)。然后你可以用 sleep 造成 2 秒的延迟(使用毫秒)。

~Rbutton & M:: 
SendInput, t You have the right to remain silent. Anything you say can and will be used against you in the Supreme Court of San Andreas, 2nd District.{enter}
sleep, 2000
SendInput, t As by the laws of San Andreas,you have the right to speak to an attorney.{enter} t If you cannot afford an attorney, one will be appointed for you.{enter}
sleep, 2000
SendInput, t Do you understand these rights as they have been read to you?{enter}
return

关于autohotkey - 如何在 AutoHotkey 中添加等待期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17900285/

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