부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. 마우스 커서가 놓인 지점의 문자열 얻는 방법 예전에 잠깐 소개한 적이 있는, The managed way to retrieve text under the cursor (mouse pointer) ; https://www.sysnet.pe.kr/2/2/186 The managed way to retrieve text under the cursor (mouse pointer) ; http://blogs.msdn.com/b/oldnewthing/archive/2013/04/08/10409196.aspx 위의 글에 공개된 코드는 마우스 커서 밑에 있는 텍스트 내용을 구하는데, 이번에는 '단어(Word)' 단위로 가져오는 것도 소개하는 글이 떴습니다. Reading the word under the cursor via UI Automation ; http://blogs.msdn.com/b/oldnewthing/archive/2015/02/16/10593625.aspx 그런데, 직접 해보면 아시겠지만 그다지 인식율이 좋지 않습니다. 실제로 "Reading the word under the cursor via UI Automation" 글의 전제 조건에 해당하는 TextPattern 클래스를 제공하는 응용 프로그램은 많지 않습니다. 몇 가지 테스트를 해 보니 메모장(notepad.exe), 마이크로소프트 오피스의 워드/아웃룩에서는 인식이 잘 되었습니다. 또한 WinForm 응용 프로그램을 만들때 기본 제공되는 "TextBox" 에디트 컨트롤에서도 인식이 됩니다. 하지만, 그 외 일반적으로 많이 사용하는 어도비 PDF 리더, 마이크로소프트 오피스의 파워포인트/원노트, 인터넷 익스플로러, 크롬 브라우저, Visual Studio 등에서는 인식이 안 되었습니다. TextPattern 클래스를 구현한 응용 프로그램이 별로 없다는 이야기겠지요. ^^ 어쨌든 그래도 UI Automation의 활용 사례 중 하나로 알아두는 것도! 첨부한 코드는 "Reading the word under the cursor via UI Automation" 글의 예제를 그대로 만들어 본 것입니다. [이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.] [다음 글] .NET Framework: 497. .NET Garbage Collection에 대한 정리[이전 글] .NET Framework: 495. CorElementType의 요소 값 설명 [최초 등록일: 2/18/2015] [최종 수정일: 7/17/2021] 이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다. by SeongTae Jeong, mailto:techsharer at outlook.com 비밀번호 댓글 작성자 2020-11-11 09시40분 Auto Translate Mouse At Text Cursor; https://chentiangemalc.wordpress.com/2020/11/10/auto-translate-mouse-at-text-cursor/; https://github.com/chentiangemalc/AutoTran 정성태 ... 106 107 108 109 110 111 112 113 114 115 116 [117] 118 119 120 ... NoWriterDateCnt.TitleFile(s) 11033정성태8/24/201623477오류 유형: 353. coreclr 빌드 시 error C3249: illegal statement or sub-expression for 'constexpr' function11032정성태8/23/201622661개발 환경 구성: 295. 최신의 Visual C++ 컴파일러 도구를 사용하는 방법 [1]11031정성태8/23/201618751오류 유형: 352. Error encountered while pushing to the remote repository: Response status code does not indicate success: 403 (Forbidden).11030정성태8/23/201621907VS.NET IDE: 111. Team Explorer - 추가한 Git Remote 저장소가 Branch에 보이지 않는 경우11029정성태8/18/201629207.NET Framework: 602. Process.Start의 cmd.exe에서 stdin만 redirect 하는 방법 [1]111028정성태8/15/201622264오류 유형: 351. Octave 설치 시 JRE 경로 문제11027정성태8/15/201623945.NET Framework: 601. ElementHost 컨트롤의 메모리 누수 현상11026정성태8/13/201625098Math: 19. 행렬 연산으로 본 해밍코드11025정성태8/12/201623943개발 환경 구성: 294. .NET Core 프로젝트에서 "Copy to Output Directory" 처리 [1]11024정성태8/12/201623125오류 유형: 350. "nProtect GameMon" 실행 중에는 Visual Studio 디버깅이 안됩니다! [1]11023정성태8/10/201624647개발 환경 구성: 293. Azure 구독 후 PaaS 서비스 만들어 보기11022정성태8/10/201625174개발 환경 구성: 292. Azure Cloud Service 배포시 사용자 정의 작업을 추가하는 방법11021정성태8/10/201622085오류 유형: 349. System.Runtime.Remoting.RemotingException - Type '..., ..., Version=..., Culture=neutral, PublicKeyToken=null' is not registered for activation [2]11020정성태8/10/201625067VC++: 98. 원본과 대상 버퍼가 같은 경우 memcpy, wmemcpy 주의점11019정성태8/10/201641908기타: 60. 도서: 시작하세요! C# 6.0 프로그래밍: 기본 문법부터 실전 예제까지 (2쇄 정오표)11018정성태8/9/201626113.NET Framework: 600. 단일 메서드 내에서의 할당으로 알아보는 자바와 닷넷의 GC 차이점 [1]11017정성태8/9/201627425웹: 33. HTTP 쿠키에 한글 값을 설정하는 방법11016정성태8/7/201625370개발 환경 구성: 291. Windows Server Containers 소개11015정성태8/7/201623676오류 유형: 348. Windows Server 2016 TP5에서 Windows Containers의 docker run 실행 시 encountered an error during Start failed in Win3211014정성태8/6/201624453오류 유형: 347. Hyper-V Virtual Machine Management service Account does not have permission to open attachment11013정성태8/6/201635209개발 환경 구성: 290. Windows 10에서 경험해 보는 Windows Containers와 docker [4]11012정성태8/6/201625249오류 유형: 346. Windows 10에서 Windows Containers의 docker run 실행 시 encountered an error during CreateContainer failed in Win32 발생11011정성태8/6/201626741기타: 59. outlook.live.com 메일 서비스의 아웃룩 POP3 설정하는 방법11010정성태8/6/201623788기타: 58. Outlook에 설정한 SMTP/POP3(예:천리안 메일) 계정 암호를 잊어버린 경우11009정성태8/3/201628963개발 환경 구성: 289. 2016-08-02부터 시작된 윈도우 10 1주년 업데이트에서 Bash Shell 사용 [8]11008정성태8/1/201623121오류 유형: 345. 2의 30승 이상의 원소를 갖는 경우 버그가 발생하는 이진 검색(Binary Search) 코드 ... 106 107 108 109 110 111 112 113 114 115 116 [117] 118 119 120 ...