# Re: 又是 SendKeys 的问题

Posted by bmf on August 27, 1999 at 08:26:16:

In Reply to: 又是 SendKeys 的问题 posted by 阿千 on August 26, 1999 at 16:28:57:

: 我sendkeys给photoimpact(一堆hotkey), 但似乎too fast
: 以至于来不及处理. 如何让vb等一会儿再sendkeys呢?
: SendKeys "%o", true
: SendKeys "p", true
: .
: .
: 难道要用for..next loop吗?

在宣告区中加入以下宣告:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds) As Long

private sub command1()
SendKeys "%o", true
call sleep(1000) '每一千等于delay一秒
SendKeys "p", true
call sleep(1000)
end sub

Follow Ups: