my purpose is to deal w/ 1 button which will appear several times in a game(actually it is the angrybird game) ,then i used the onappear()/observe() but ir can just deal w/ the 1 time the button shows ,following shows can not be deal ,below is my test code ,
what i think is that it can deal each time when button shows until the script end.
below is my test code :
def myHandler(event):
click("1373853815762.png")
wait(5)
Settings.ObserveScanRate=1
onAppear(("1373853815762.png"),myHandler)
observe(FOREVER,background = True)
for i in range(1,5000):
print "testing....."
wait(5)
my purpose is to deal w/ 1 button which will appear several times in a game(actually it is the angrybird game) ,then i used the onappear( )/observe( ) but ir can just deal w/ the 1 time the button shows ,following shows can not be deal ,below is my test code ,
what i think is that it can deal each time when button shows until the script end.
below is my test code : "1373853815762. png") ObserveScanRate =1 ("1373853815762 .png"), myHandler) FOREVER, background = True)
def myHandler(event):
click(
wait(5)
Settings.
onAppear(
observe(
for i in range(1,5000):
print "testing....."
wait(5)