4

I have this script for a game

~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}

I want my script to wait 2 seconds after each enter before sending the next line. How can I do that?

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
lramos15
  • 491
  • 2
  • 4
  • 8

1 Answers1

5

If you mean to send a tab character, you need to change your t `t

So, change your code for the hotkey to read as a block instead of just a single line (do this by not putting the command all on one line, and by adding return at the end of it). Then you can cause the 2 second delay with sleep (which uses milliseconds).

~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
bgmCoder
  • 6,205
  • 8
  • 58
  • 105
  • 2
    @iramos, `\`t Do...` sends `{Tab}{Space}Do`, by the way (it's a common mistake, so just a tip). – Brigand Jul 28 '13 at 19:25
  • 1
    I understand everyone thinks I meant for it to have a tab no I didn't it is actually meant to type "T" – lramos15 Jul 28 '13 at 20:37