Re: [Sikuli-driver] [Question #684034]: Needs to pick someones brain
Question #684034 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684034 xyz_User gave more information on the question: The last sentence I should have said comparing who has the least of "GREEN" health bar -- 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 #684034]: Needs to pick someones brain
Question #684034 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684034 Status: Answered => Open xyz_User is still having a problem: Just got a chance to try this, I think i'm missing the point and require some more explanation. If you have the time, can you show me the function for this scenerio: Let's say I'm the healer character in the game, and I need to scan who has the lowest amount of health comparing all of those 4 health bars and then click 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
Re: [Sikuli-driver] [Question #684034]: Needs to pick someones brain
Question #684034 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684034 xyz_User posted a new comment: Not on a PC atm going to check as soon as I get home, thanks RaiMan. As always, very prompt in your response! -- 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 #684054]: Trying to select text with mouse functions
Question #684054 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684054 Maurice Richard posted a new comment: Thank-you RaiMan, this worked for me. It's much appreciated! -- 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 #684054]: Trying to select text with mouse functions
Question #684054 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684054 Status: Answered => Solved Maurice Richard confirmed that the question is solved: Thanks RaiMan, 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 #684054]: Trying to select text with mouse functions
Question #684054 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684054 Status: Open => Answered RaiMan proposed the following answer: this works for me with latest 1.1.4 on Windows 10: switchApp("Edge") r = selectRegion() hover(r.getTopLeft()) mouseDown(Button.LEFT) wait(0.3) mouseMove(r.getBottomRight()) mouseUp() type("c", Key.CTRL) wait(0.5) print App.getClipboard() click() -- 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 #684054]: Trying to select text with mouse functions
New question #684054 on Sikuli: https://answers.launchpad.net/sikuli/+question/684054 Originally I tried using OCR, but it's not as consistent as I need it to be. So I'm trying to select a section of text on the page with mouse functions. I've tried many variations, but I always get the same error: "Invalid combination of button flags" Here's a current snippet of the code: regTheText = Region(XText, YText, XTextLength, YTextLength ) leftPoint = regTheText.getTopLeft() rightPoint = regTheText.getBottomRight() hover(leftPoint) mouseDown(Button.LEFT) wait(0.5) mouseMove(rightPoint) mouseUp(Button.LEFT) It doesn't seem to like the mouseDown command. Is my code incorrect? Or do I need to import something specific? Any help is appreciated. Thanks! Maurice -- 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 #684034]: Needs to pick someones brain
Question #684034 on Sikuli changed: https://answers.launchpad.net/sikuli/+question/684034 Status: Open => Answered RaiMan proposed the following answer: You might use the Location.getColor() feature. a sample with the most left bar in your image: switchApp("opera") img = Pattern("img.png").targetOffset(-24,1) patR = Pattern("img.png").targetOffset(21,1) offsetR = patR.getTargetOffset() hover(img) start = Mouse.at() end = start.offset(offsetR.x * 2, 0) for n in range(offsetR.x * 2 + 10): print start.offset(n,0).getColor().getGreen() To get specific points in an image (as here the left side middle and the right side middle of the bar) you can use the image Preview feature in the IDE. There are about 40 pixels to check. If you use the check-the-middle algorithm, you would have your result latest with 6 checks in a loop: - test the middle of the bar - if it is black, test the middle of the left half of the bar - if it is not black, test the middle of the right half of the bar - ... hope you got 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