sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #43303
Re: [Question #652975]: capture image automatically in a specific location
Question #652975 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/652975
Status: Open => Answered
masuo proposed the following answer:
This is one way to act something after certain duration.
In this case, action is keyUp().
import thread
import datetime
def actsomething(name,*arg):
print datetime.datetime.now()
cnt = arg[0]
while cnt > 0:
cnt = cnt -1
sleep(1)
keyUp(Key.SHIFT)
print datetime.datetime.now()
duration = 5 # 5sec
thread.start_new_thread(actsomething,("funcname",duration))
keyDown(Key.SHIFT)
for i in range(10):
type("a")
sleep(1)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.