Highlight Images
I would like to highlight certain images whenever they present on the screen. I know I can do reg.highlight, but I'm having trouble highlighting the actual image matches. Is there a way I can use something like reg.getLastMatch but instead of click or hover make it highlight?
I've tried stuff like:
reg= Region(
if reg.exists(
reg.
##this highlights my entire screen
also tried
test=[imm1.PNG, imm2.PNG, imm3.PNG, etc]
matches=
if matches:
matches.
##doesnt work
Basically Im trying to make something like
while True:
find(
##fails when imms not visible also only highlights 1 imm at a time
but for multiple images at the same time and in a loop.
Any ideas? I've read the docs but I only learned how to highlight regions
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Sikuli Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- 2020-03-25
- Last query:
- 2020-03-25
- Last reply:
- 2020-03-25
Eric G (gamemaster181) said : | #1 |
So apparently I got the highlighting to work on multiple images, but is there any way that I can highlight them at the same time? As in have 3 or 4 highlighted items at once? Currently, I just cycle through them with a for loop.
##^rest of code
if selected == Comps[3]:
while True:
matches = reg.findAny(test)
for match in matches:
|
#2 |
--- if reg.exists(
not possible - only one image as parameter allowed
--- second trial (see docs!)
test=[imm1.PNG, imm2.PNG, imm3.PNG, etc]
matches=
for match in matches:
match.
The solution: (see docs!)
for match in matches:
match.
wait(1)
highlightAllOff()
Eric G (gamemaster181) said : | #3 |
Thanks RaiMan, that solved my question.