Question #264563 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/264563
Status: Answered => Open eduardobedoya is still having a problem: Yes Raiman, I upgraded into this so far, but still takes 6 seconds before any mouse move or hover. Could restricting the search area improve the script speed? How could I increase speed?? App.focus("IrfanView") Settings.DelayAfterDrag = 0 Settings.DelayBeforeDrop = 0 Settings.MoveMouseDelay = 0 try: MatchesWNI = list(findAll(Pattern("1429333732294.png").exact())) WhtNumImg = len(MatchesWNI) except FindFailed: WhtNumImg = 0 MatchesWNI = [] try: MatchesBNI = list(findAll(Pattern("1429334230870.png").exact())) BlkNumImg = len(MatchesBNI) except FindFailed: BlkNumImg = 0 MatchesBNI = [] try: MatchesWSI = list(findAll(Pattern("1429334355293.png").exact())) WhtStartImg = len(MatchesWSI) except FindFailed: WhtStartImg = 0 MatchesWSI = [] try: MatchesBSI = list(findAll(Pattern("1429334504677.png").exact())) BlkStartImg = len(MatchesBSI) except FindFailed: BlkStartImg = 0 MatchesBSI = [] #This below combine the Imgs giving this result [7, 0, 1, 1] #AllImg=[] #AllImg.append(WhtNumImg) #AllImg.append(BlkNumImg) #AllImg.append(WhtStartImg) #AllImg.append(BlkStartImg) #This below combine all Imgs giving this result [7, 0, 1, 1] #AllImg = [WhtNumImg] + [BlkNumImg] + [WhtStartImg] + [BlkStartImg] #This below combine all Imgs giving this result 9 AllImg = WhtNumImg + BlkNumImg + WhtStartImg + BlkStartImg #This below combine all Matches giving a result that can't be sorted (I dunno why) #AllMatches = [MatchesWNI] + [MatchesBNI] + [MatchesWSI] + [MatchesBSI] #This below combine all Matches giving a result that can be sorted AllMatches = MatchesWNI + MatchesBNI + MatchesWSI + MatchesBSI if AllImg > 0: SortedAllMatches = sorted(AllMatches, key=lambda m:m.y) # sorts top to bottom #for item in FinalsortedMatches: # hover(item) for index, item in enumerate(SortedAllMatches): hover (item) print index, item print "AllImg:", AllImg Thanks Advanced. Please tell me how would you improve this code. -- You received this question notification because you are a member of Sikuli Drivers, which is an answer contact for Sikuli. _______________________________________________ Mailing list: https://launchpad.net/~sikuli-driver Post to : sikuli-driver@lists.launchpad.net Unsubscribe : https://launchpad.net/~sikuli-driver More help : https://help.launchpad.net/ListHelp