매크로

조회 수 481 추천 0 댓글 1

ImageSearch is a picky beast.

  1. first it has to deal with locations on a screen or in a window
  2. then it has to deal with a directory and file whose names must be capitalized properly.
  3. then it has to deal with changing colors and sizes that you must take into account.
  4. then it has to deal with the screen and window resolutions on different machines.
  5. then you have transparencies to adjust for. 

As you can see there's a lot that can go wrong with it and having only 3 errorcodes to report any

possible problem it can encounter leaves a lot up to the user to try and figure out. This is why

many people take a screenshot of the area first and do an image from that. And why many people

combine an image search on just a partial image and not the full one where possible and I've learned

to do a doublecheck for a unique color within the image if possible using PixelSearch. 

 

things I've learned

  1. make sure the CoordMode is properly set before calling ImageSearch. (Window or Screen)
  2. Make sure to grab the biggest part of the image you can get away with.
  3. If the window you're searching is a child window make sure you aren't using IfWinActive on a different window.
  4. Make sure the command can find the image it's looking for using it's correct directory.
  5. Make sure you use a few variations (*5 for instance) in the command to improve reliability
  6. If the screen resolution changes the Search can fail. Make sure the resolution stays the same as when the image was captured.
  7. If using larger or smaller fonts in your target machine than you did when the image was capture the search can also fail
  8. Zoom in a browser is not your friend.
  9. When in doubt use the smallest search area possible it not only makes the search faster it's more reliable.
  10. If using CoordMode, ... ,Window make sure you make that window active before searching
  11. If using CoordMode, ... ,Window make sure all the coords are relative to that window not the screen.
  12. If using CoordMode, ... ,Window make sure that you get the WinGetActiveStats so you know it's width and height so you know where the max end of the search area really is and use those if necessary in the ImageSearch Command.
  13. If calculating a coordinate postion use parens surrounding the calculation in the Search command to get the correct result and  so you don't use % around the variables in the calculation.
  14. Use % around single variables, not calculations, in the ImageSearch command.
  15. If you get an error 1 for a return result, the command found the image it just didn't match what was actually on the screen
  16. If you get an error 2 for a return result, the command couldn't find the stored image or some other factor like permissions, a network error, or some system level event prevented it from completing.
  17. If you use the Windows SnippingTool to grab the image the first time make sure to set Snipping tool's options so it doesnt store the border with the image.

Lots to remember huh? Write these down so you can refer back to them if your searches fail. 


ImageSearch는 까다로운 짐승입니다.

  1. 처음에는 화면이나 창에서 위치를 처리한다.
  2. 다음은 이름이 제대로 대문자로해야하는 디렉토리 및 파일을 처리 할 수​​ 있습니다.
  3. 다음은 고려해야합니다 변경 색상과 크기를 처리 할 수​​있다.
  4. 다음은 서로 다른 시스템의 화면 및 창 해상도를 처리 할 수​​있다.
  5. 당신은 대한 조정 투명 필름이. 

그것으로 잘못 될 수있는 만 3 ErrorCode가를 갖는 하나를보고 많은 거기에 당신이 볼 수 있듯이

이 발생할 수있는 가능한 문제를 시도하고 파악하는 사용자에게까지 많은 나뭇잎. 이는 이유

많은 사람들이 첫 번째 영역의 화면을 캡처하고 그에서 이미지를 않습니다. 왜 많은 사람들이

단지 부분적인 이미지에 이미지 검색을 결합이 아닌 하나의 전체 가능한 내가 배운

PixelSearch를 사용하여 가능하면 이미지 내에서 고유 한 색상를 재차을 할 수 있습니다. 

 

내가 배운 것들

  1. CoordMode 제대로 ImageSearch를 호출하기 전에 설정되어 있는지 확인합니다. (윈도우 또는 화면)
  2. 당신이 멀리 얻을 수있는 이미지의 가장 큰 부분을 잡아해야합니다.
  3. 당신이 검색하는 윈도우가 자식 윈도우 인 경우 다른 창에 IfWinActive를 사용하지 않는 있는지 확인하십시오.
  4. 명령은 그것이 올바른 디렉토리의 사용을 찾고 이미지를 찾을 수 있는지 확인합니다.
  5. 만약 안정성을 향상시키기 위해 명령에 약간의 변화 (예 : * 5)를 사용하여 확인
  6. 화면 해상도가 변경되면 검색이 실패 할 수 있습니다. 해상도가 이미지가 캡처 된 때와 동일하게 유지해야합니다.
  7. 당신이보다 이미지가 검색이 또한 실패 할 수 있습니다 캡처 때 대상 시스템에 크거나 작은 글꼴을 사용하는 경우
  8. 브라우저에서 확대 당신의 친구가 아닙니다.
  9. 의심 가능한 최소 탐색 영역을 사용할 때 더 신뢰성있어 신속하게 검색뿐만 아니라.
  10. CoordMode이, ..., 창 확인 사용하는 경우 당신은 검색하기 전에 해당 창을 활성화
  11. CoordMode를 사용하는 경우, ..., 창은 모든 좌표가 창없는 화면을 기준으로되어 있는지 확인합니다.
  12. CoordMode를 사용하는 경우, ..., 창 당신은 검색 영역의 최대 끝이 정말 어디 알고 ImageSearch 명령에 필요한 그 경우를 사용할 수 있도록 폭과 높이를 알고 있도록 WinGetActiveStats를 얻을 수 있는지 확인하십시오.
  13. 검색 명령에 계산을 둘러싼받은 위치 좌표를 사용 괄호를 계산하면 정확한 결과를 얻을하는 경우 그래서 당신은 계산의 변수 주위 %를 사용하지 마십시오.
  14. ImageSearch 명령에서, 하나의 변수가 아닌 계산 주위 %를 사용합니다.
  15. 당신이 반환 결과에 대한 오류 1을받을 경우, 명령은 화면에 실제로 있었는지 그냥 일치하지 않는 이미지를 발견
  16. 당신이 반환 결과에 대한 오류 2를 얻을 경우, 명령은 완료를 방지 저장된 이미지 또는 권한과 같은 몇 가지 다른 요인, 네트워크 오류, 또는 시스템 수준의 이벤트를 찾을 수 없습니다.
  17. 이미지를 잡아 윈도우 SnippingTool를 사용하는 경우 첫 번째 시간은 이미지와 국경을 저장 나던 있도록 도구의 옵션을 자르는 설정해야합니다.

많은 응을 기억 하는가? 당신의 검색이 실패 할 경우에 당신이 그들에게 다시 참조 할 수 있도록이를 기록합니다. 


이미지 함수 관련찾다가 외국포럼에서 본거퍼와봅니다

번역할까 하다가 지금 문제해결도안됫는데 번역할 여유가지는건 오버같아서 걍 구글 번역기를 퍼왓어요 ㅠㅠ

참조해가면서 이미지서치안되는 이유찾아봐용~ 

저도찾아야됩니다..OTL.. 내함수는왜 에러코드2에서 벗어날수없는가...




  • 완납 2015.09.08 16:59

    좋은 팁이네요ㅎ 근데 에러레벨2면 이미지파일이 지정해둔 경로상에 없을때 아닌가요?


List of Articles
분류 제목 글쓴이 최근변경 추천
질문 이미지 서치에 대해서 궁금한 것이 있습니다 7 zzxxll 2015.09.21 1/0
질문 이미지 서치에대해 질문좀드리고싶습니다.. 1 깜장별 2016.08.09 0/0
질문 이미지 서치에서 trans가 잘안되서 질문드립니다. 2 랑아 2015.11.13 0/0
질문 이미지 서치와 비활성 클릭 질문입니다 1 오핫이 2019.05.31 0/0
질문 이미지 서치할때 함수지정시에 이미지부분을 어떻게 지... 9 닉네이밍 2015.09.01 0/0
질문 이미지 서치해서 그 이미지 클릭하는 방법좀 알고 싶습... 33 낭군이 2015.03.06 0/0
질문 이미지 서치해서 합성하는방법 좀 도와주세요. 1 제이제이7 2020.05.25 0/0
질문 이미지 서치후 그 이미지를 클릭하려면 어떻게 하나요?... 100z 2017.05.22 0/0
질문 이미지 서치후 비활성 클릭 질문드립니다. 9 내딸민서 2016.11.14 0/0
질문 이미지 서칭 고수님들! 도와주세요 2 개발자의하루 2017.08.14 0/0
질문 이미지 서칭 매크로 간단한거 쉽게 제작할 수 있는 걸 ... 1 미안하다아앜 2019.06.23 0/0
질문 이미지 서칭 질문드립니다. 4 생물 2014.10.26 0/0
질문 이미지 서칭 질문입니다. 곰도ㄹl 2017.05.01 0/0
질문 이미지 서칭 클릭 좌표 어떻게 설정해야할까요? 4 bleuG 2016.07.09 0/0
질문 이미지 여러개 한번에 찾으려면 어떻게 해야할까요 1 지니블렉션 2015.04.25 0/0
질문 이미지 인식은 하는데 클릭을 못하네요; 3 아몬드초코 2017.05.03 0/0
질문 이미지 인식이 안되는데 뭐가 문제일까요 5 바라람 2021.01.07 0/0
질문 이미지 찾기 무한 반복 탈출 도와 주세요 2 반디펑 2020.09.10 0/0
질문 이미지 찾은 후 특정 좌표 클릭 질문 4 SugarM 2018.03.28 0/0
자유 이미지 함수에서 헤맬때 참조해볼팁 1 닉네이밍 2015.09.08 0/0
Board Pagination Prev 1 ... 161162163164165166167168169 ... 209 Next
/ 209

전체 최신 인기글

전체 주간 인기글