Re: [Sikuli-driver] [Question #403973]: Problem if Exists(Image)
Question #403973 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403973 Status: Open => Answered masuo proposed the following answer: setFindFailedResponse(SKIP) may be useful in this case. Make sure it meets the purpose. See document. http://sikulix-2014.readthedocs.io/en/latest/region.html?highlight=setFindFailedResponse#Region.setFindFailedResponse -- You received this question notification because your team Sikuli Drivers 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
[Sikuli-driver] [Question #403973]: Problem if Exists(Image)
New question #403973 on Sikuli: https://answers.launchpad.net/sikuli/+question/403973 Hi again, I've some trouble with this : def Search(): if exists(image): for x in findAll(image): click(x) [error] FindFailed ( can not find P(xx.png) I've understood that if there are no images to find, it fails, but how can I do then ? (I want to click on all images corresponding but if there are no images, don't do anything at all and continue my script) Thanks again, quick and precise :) -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403961]: ''Extract''Coordinate of Image
Question #403961 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403961 Status: Answered => Solved Marc confirmed that the question is solved: Thanks masuo, that solved my question. -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403961]: ''Extract''Coordinate of Image
Question #403961 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403961 Status: Answered => Open Marc is still having a problem: Nice thanks ! Now I have another problem, Skuli crashes :s I have like 30 images, I want to print ALL x positions, but the program don't supports it, what can I do ? -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403961]: ''Extract''Coordinate of Image
Question #403961 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403961 Status: Open => Answered masuo proposed the following answer: You can use getX() and getTarget() together. p = Pattern(Image).targetOffset(x,y) m = find(p) print m.getTarget() mx = m.getTarget().getX() my = m.getTarget().getY() print mx,my -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
Question #403943 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403943 Description changed to: Hello.! I got a stable increasing memory.It starts the script from 400mb ram and in 4hours increased to 2,50gb ram and then hangs the Mac. for tt in range(150): if count == 0: Model() else: ModelSolver() count = 0 continue -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403961]: ''Extract''Coordinate of Image
Question #403961 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403961 Marc gave more information on the question: Ok, so I found this : find(Image).getX() It's simple I feel so stupid >< BUT it's not the center of the Image, how I can get it ? -- You received this question notification because your team Sikuli Drivers 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
[Sikuli-driver] [Question #403961]: ''Extract''Coordinate of Image
New question #403961 on Sikuli: https://answers.launchpad.net/sikuli/+question/403961 Hi! Sorry for bad English I haven't code since a while, I'm a bit lost : I want to extract the coordinate x and y of multiple images to compare their place in space, I found this : p = Pattern(Image).targetOffset(x,y) m = find(p) print m. getTarget() It returns : L(335,609)@S(0)[0,0 1920x1080] How to get 335 & 609 and assign them to variables Thanks ! -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
Question #403943 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403943 Status: Answered => Open spyros-liakos is still having a problem: - In 2 hours i get the same amount of memory: 1,25gb and keep increasing What i noticed is,, when the loop starts from the begin and goes here: if onceplay == True: print("#Waiting Soldiers to Complete...") while True: if findtroopsfull.exists(Pattern(campsfull).exact()): break else: if count == 1: return count continue memory gets increased e.x from 650mb to 720mb!!! then all the script is executed with a very small of amount e.x 1-2mb and when it comes back to the start the loop we got the same (memory gets increased e.x from 650mb to 720mb!!!) - I have even try to brake the script to functions but still the same. -- You received this question notification because your team Sikuli Drivers 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
[Sikuli-driver] [Question #403948]: OCR get wrong digit
New question #403948 on Sikuli: https://answers.launchpad.net/sikuli/+question/403948 hello, I am working with Robotframework-SikuliLibrary for windows app testing. For reading text I have used 'Set Ocr Text Read' & 'Get Text' keyword. OCR can read letters correctly but digits incorrectly. Have their any solution? Thanks in advance. -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
Question #403943 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403943 spyros-liakos posted a new comment: Ok. -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
Question #403943 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403943 Status: Open => Answered RaiMan proposed the following answer: could you give 1.1.1 a try: http://sikulix.com -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403786]: Sikuli running from personal laptop and finding image on remote machine
Question #403786 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403786 Status: Needs information => Solved pratik patil confirmed that the question is solved: Sorry, it was my mistake. I am able to find it now. -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
Question #403943 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403943 spyros-liakos posted a new comment: 1.1.0 -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
Question #403943 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403943 Status: Open => Needs information RaiMan requested more information: version of SikuliX? -- You received this question notification because your team Sikuli Drivers 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
Re: [Sikuli-driver] [Question #403407]: Multiple .rb file organization, image retention
Question #403407 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/403407 Status: Open => Expired Launchpad Janitor expired the question: This question was expired because it remained in the 'Open' state without activity for the last 15 days. -- You received this question notification because your team Sikuli Drivers 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
[Sikuli-driver] [Question #403943]: Stable increasing memory - Hang script!!
New question #403943 on Sikuli: https://answers.launchpad.net/sikuli/+question/403943 Hello.! I got a stable increasing memory.It starts the script from 400mb ram and in 4hours increased to 2,50gb ram and then hangs the Mac. The mac has 4gb ram and 10.10 osx. I run script from command this: java -jar ~/Desktop/Myapp/sikulixapi.jar -r ~/Desktop/Myapp/test.sikuli I believe its not the JVM but set in the code..please help!!! Here is the script: #-Detecting Os - Specifications---# from org.sikuli.natives import Vision Vision.setParameter("MinTargetSize", 6) # the default is 12. Settings.ActionLogs=0 Settings.InfoLogs=0 Settings.DebugLogs=0 myos = Settings.isMac() if myos == True: print("#Detected Mac OSX...START") else: popup("#Not detected Mac..EXIT") exit() regblueline = Region(602,315,100,150) #βρικει την μπλε γραμμη του error clicktoavoiderrordone = Region(1280,95,2,2) #παταει επανω δεξια για ασφαλεια clickendbattle = Region(111,582,36,20) #κουμπι κλικ για endbattle κοκκινο και end για error findtroopsfull = Region(56,136,50,50) #reg για αν γεμισαν τα troops tabtraintroops = Region(480,100,2,2) #reg για το tab_traintroops soldierreg = Region(100,460,50,50) #reg για να προσθεσει η να τσεκαρει troops regclosetroops = Region(1200,90,2,2) #reg για να κλεισει το παραθυρο troops ολο arm = Region(181,88,35,26) #reg για να παει στο tab_army swordreg = Region(50,580,2,2) #reg για να πατησει το σπαθι btnhome = Region(638,674,23,25) #reg για το κουμπι returnhome-τελιωσε η μαχη screenok = Region(1196,455,81,80) #reg για αν ειμαστε στην αρχικη οθονη regfindloot = Region(142,152,43,18) #reg για να βρει το καταλληλο loot nextfindbattlebtn = Region(1110,560,2,2) #reg για να κλικ σε επομενη αναζητηση βασης regmap = Region(90,690,2,2) #reg παταει στον χαρτη για επιθεση findmatchbtn = Region(300,598,2,2) #reg παταει στο κουμπι find-match attackreg = Region(173,67,920,570) #η περιοχη που ψαχνει για τα σημεια collect = Region(105,125,980,570) #reg για το collect στην αρχη #__Variables Attack_Find_Red_Points START# count = 0 FindLoot = "FindLootBattleV1.png" FastClickPoint = "1476737265836.png" campsfull = "1476660328402.png" onceplay = False popupcoc = "wifierrorcircle.png" popupcoca = "bluelineerror.png" OriginalBaseFind = "originalbasedone.png" Returnhomeendbattle = "Returnhomeendbattle.png" Endbattle = "Endbattle.png" blacksold = "blacksoldier.png" Surrender = "surrender.png" import random random.seed() #αποθηκευουμε τις συντεταγμενες των σημειων Apointattack = "" Bpointtattack = "" Cpointattack = "" Dpointattack = "" Epointattack = "" Fpointattack = "" ## #αν ειναι ισο η πανω απο 3 σημεια κανε επιθεση αλλιως ειναι false goforattack = True #τα δειγματα για τα σημεια Redpoint1 = "red1.png" Redpoint2 = "red2.png" Redpoint3 = "red3.png" RedPoint4 = "RedPoint4.png" RedPoint5 = "RedPoint5.png" RedPoint6 = "RedPoint6.png" ## #<--THE OBSERVE OPERATION> def handler(event): global count count = 1 wait(2) print("#Observe Error") clicktoavoiderrordone.click() #κλικ βασικο σφαλματος wait(2) event.stopObserver() regblueline.observe() return count regblueline.onAppear(Pattern("bluelineerror.png").exact(),handler) regblueline.onAppear(Pattern("wifierrorcircle.png").exact(),handler) regblueline.observe(background = True) #--START--# def Model(): global count while True: if screenok.exists(Pattern(OriginalBaseFind).exact()): clicktoavoiderrordone.click() print("#Starting the program...") break else: print("Waiting for the Original Base...") clicktoavoiderrordone.click() #κλικ βασικο σφαλματος wait(5) continue #<<---CREATE->># #print("#Prepare for Building") wait(0.5) clicktoavoiderrordone.click() wait(1) keyDown(Key.CMD) wheel(WHEEL_UP, 30) keyUp() wait(1) rnmtime = random.randint(2, 5) wait(rnmtime) wait(1) wait(0.1) swordreg.click() if count == 1: return count while True: wait(0.4) if findtroopsfull.exists(campsfull,0): print("#Base is Full...") rnmtime = random.randint(1, 2) wait(1) tabtraintroops.click() if count == 1: return count wait(1) if soldierreg.exists(Pattern(blacksold).similar(0.95)): wait(1) #regclosetroops.hover() regclosetroops.click() if count == 1: return count else: if count == 1: return count soldierreg.hover() mouseDown(Button.LEFT) wait(4) hover(FastClickPoint) mouseUp() wait(1)