Using repeat in event handle with wait time
Hi,
I am using Siklulix 2.0.4 on windows 10.
I have registerd an onAppear event for a region. In the event handle i am trying to pause the observation for 5 seconds like below :
def changed(event):
print("Region appeared")
region.
print("Region closed.")
event.repeat(5)
I observed that the event is running all the time, its not paused for 5 seconds. and because of this my further steps are not executing or they are executing with huge delay.
Any advises, if i am doing something wrong. my concern is that the wait time not working fine here.
Thanks .
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Sikuli Edit question
- Assignee:
- No assignee Edit question
- Last query:
- 2020-07-01
- Last reply:
- 2020-07-04
masuo (masuo-ohara) said : | #1 |
I am interested in your question, so I tested in my environment.
"repeat" work fine in my environment.
Did you use "observeInBackg
[my environment:]
Windows10, SikuliX2.0.4
[my sample code:]
def change(event):
event.
event.repeat(5)
r = Region(0,0,100,800)
r.onAppear(
r.observeInBack
for cnt in range(30):
if r.exists(
else:
Can you help with this problem?
Provide an answer of your own, or ask Padam Jain for more information if necessary.