매크로

조회 수 488 추천 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면 이미지파일이 지정해둔 경로상에 없을때 아닌가요?


최근 추천글

오핫 제작합니다 1 설입 2024-06-18 23:45 +2
List of Articles
분류 제목 글쓴이 최근변경 추천
자유 블레이드 핸콕님매크로 2 prodie 2015.08.14 0/0
자유 신세계 8 fnwj 2015.08.20 0/0
자유 바쁘신데도 불구 하고 시간 내 주신 리체님! 정말 감사... 2 꿈을낚는아이 2015.08.16 0/0
자유 출장중이라 자주 들리지 못하네요. 10 외치기 2015.09.01 1/0
자유 옛날에 제작한 메이플 매크로 스크립트 8 암드래 2019.02.13 2/0
자유 안녕하세요 오토핫키 때문에 가입하게 됐습니다 3 뀨뀨꺄꺄 2015.11.19 0/0
자유 오토핫키 배워보려구요! 4 은하 2016.09.08 0/0
자유 애니팡오토 사례드려요ㅜㅠ 2 higomy 2015.08.28 0/0
자유 혹시 스크립트가 도중에 작동을 멈추는 분 계신가요? 14 sistt 2015.09.01 0/0
자유 이미지 함수에서 헤맬때 참조해볼팁 1 닉네이밍 2015.09.08 0/0
자유 외치기님.모바게님.. 6 제발등업좀2 2015.09.04 0/0
자유 갑자기 썰러아네요.. 질문도없고.. 3 제발등업좀2 2015.09.24 0/0
자유 오토핫키 초보...;;; 7 앙쥐 2015.09.24 0/0
자유 깜짝이야... fnwj 2015.09.22 0/0
자유 오토핫키 움직이는 이미지 서칭질문 2 켈스이 2015.09.25 0/0
자유 아..언패킹당해네요 ㅋㅋ 기분..참 29 제발등업좀2 2016.01.14 1/0
자유 gdip_imagesearch 사용하시는분 팁좀주세요! 8 횬히 2015.10.10 0/0
자유 함수 파라메터 질문좀 드리겠습니다. 7 횬히 2015.10.08 0/0
자유 흠냐 오토핫키와 c++ 연관성 34f35 2015.10.09 0/0
자유 GUI만들기 너무 귀찮네요. 15 외치기 2015.10.21 0/0
Board Pagination Prev 1 ... 67891011121314 ... 28 Next
/ 28

전체 최신 인기글

전체 주간 인기글