Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-05 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: Sorry for the mistake: getLastMatch() is region specific. So correctly: if day.exists("endday.png",0): click(day.getLastMatch()) wait(0.5) with version 1.0.1+

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread Smizzy
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Smizzy posted a new comment: Im having an issue with your suggestion in post#9 about using click(getLastMatch) when an exists has just been run. if day.exists("endday.png",0): day.click(getLastMa

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: A search no matter triggered by what method (find, click, exists, …) waits 3 seconds in the standard for something to appear before giving up. if possible, 3 searches per second

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread Smizzy
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Smizzy posted a new comment: Ok, wow, thats a lot of very intense things. I learned programming from a C programming course so my natural reaction was to just do massive if chains, this doit function seems ve

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: your question in comment #8: images = (img1, img2, img3, img4) found = [] for i in range(len(images)): if exists(images[i], 0): found.append(True) else:

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: at comment #8: looks ugly because of the many necessary indents if clicker(item1)==0: if item2 != 0: if clicker(item2)==0:

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: customerlist = ("buyitem-2.png","dungeonquester.png","questgiver.png") if customer.exists(customerlist): should not work, because exists() does not accept a list o

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: --- A general comment: if you have found something in a region (e.g. with game.exists(someImage)) then you can use game.click(getLastMatch()) to click, what just was found in reg

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread Smizzy
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Smizzy posted a new comment: I also have this kind of a situation and was wondering how to optimize it c1="shopkeeper-1.png" # worker icon c1i1=0 # most desired item

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-04 Thread Smizzy
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Smizzy posted a new comment: The script im working on is kinda long, like 200 lines, Ill just post the relevant parts. customerlist = ("buyitem-2.png","dungeonquester.png","questgiver.png") i

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-03 Thread Eugene S
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Eugene S posted a new comment: Can you post your code? -- You received this question notification because you are a member of Sikuli Drivers, which is an answer contact for Sikuli.

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-02 Thread Smizzy
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Smizzy posted a new comment: For those, say i have 4 sets of images and I search for the first image in each set within a region, is there a way to tell which set the image came from when it is found? -- Yo

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-02 Thread Eugene S
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Eugene S posted a new comment: @ RaiMan I completely agree with your comment. I just wanted to show the concept here but clearly, the approach you mentioned should be used for better efficiency. Eugene

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-01 Thread RaiMan
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 RaiMan posted a new comment: @Eugene your solution is principally ok, but very time consuming caused by the unnecessary waiting for not existing images in this case. so at least this way: imagesList = ["ima

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-01 Thread Smizzy
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Status: Answered => Solved Smizzy confirmed that the question is solved: Thanks Eugene S, that solved my question. -- You received this question notification because you are a member of Sikuli Drivers,

Re: [Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-01 Thread Eugene S
Question #252512 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/252512 Status: Open => Answered Eugene S proposed the following answer: Hi, You search should be for a region but for a pattern. First you must create screenshots of patterns you wish to detect on the screen.

[Sikuli-driver] [Question #252512]: How to use regions properly

2014-08-01 Thread Smizzy
New question #252512 on Sikuli: https://answers.launchpad.net/sikuli/+question/252512 I am quite new to programming, and while i am enjoying sikuli and the intuitive syntax I am wondering which is the proper method for using Regions. Ive defined a region "icon = Region( 40, 230, 75, 350)" then