4

我有这个游戏脚本

~Rbutton & M:: SendInput t 你有权保持沉默。您所说的任何内容都可以而且将会在第二区圣安地列斯最高法院对您不利。{进入} t 根据圣安地列斯的法律,您有权与律师交谈。{进入} t 如果您不能支付律师费用,将为您指定一名律师。{enter} t 您是否了解这些权利,因为它们已经向您宣读过?{enter}

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

4

1 回答 1

5

如果您要发送制表符,则需要更改您的t `t

因此,将热键的代码更改为块读取,而不是单行(通过不将命令全部放在一行上,并return在其末尾添加来做到这一点)。然后你可以导致 2 秒的延迟sleep(使用毫秒)。

~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
于 2013-07-27T18:04:00.557 回答