Code: Select all
a::{Send "b"},{sleep 1}
viewtopic.php?t=116521
Thanks!
Code: Select all
a::{Send "b"},{sleep 1}
They can be combined in exactly the same way, which is not what you did. It doesn’t follow anything shown or explained in the other thread. It is not correct syntax for either one, let alone combined.howardRaul1 wrote: ↑ I noticed that SoundBeep() and MsgBox() can be combined in one line (please see the URL below). I am not sure why "Send" and "sleep" cannot be combined the same way.
Code: Select all
#Requires AutoHotkey v2.0
a::Send("b"), Sleep(1)
Code: Select all
send("Hello{250}what is that?!!{100}look it's behind you!{50}it's a monster!")
xMaxrayx wrote: ↑13 Dec 2023, 10:25if you are interested you can use ahkv2-H they can do sleep {N} like this
Code: Select all
send("hello{250}what!!{100}look behind you{50}it's monster")
Code: Select all
StutterSend("hello{250}what!!{100}look behind you{50}it's monster")
StutterSend(Text)
{
For Line in StrSplit(Text, '}')
{
Elements := StrSplit(Line, '{')
Send Elements[1]
try Sleep Elements[2]
}
}
Hi ,sorry it's not in the vanilla AHKv2 it's for AHKv2-H.howardRaul1 wrote: ↑13 Dec 2023, 16:27Hi @xMaxrayx,
I tried your code in v2, but the code doesn't produce the intended delays of 250ms/100ms/50ms.
The v2 documentation on Send() also didn't mention this feature. Is this a beta feature?
Thanks!
https://hotkeyit.github.io/v2/docs/AutoHotkey.htmSleep functionality for Send command, for example Send 123{100}456 would send 123 then sleep for 100 milliseconds and send 456.