# 한글의 현재 캐럿으로 포커스 이동이 있나요?

**URL:** <https://forum.developer.hancom.com/t/topic/896>\
**Category:** 한글 오토메이션\
**Created:** [9월 1, 2023, 1:02오전 UTC](https://forum.developer.hancom.com/t/topic/896 "2023-09-01T01:02:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user63](https://avatars.discourse-cdn.com/v4/letter/u/49beb7/32.png) [@user63](https://forum.developer.hancom.com/u/user63)\
**Post date:** [9월 1, 2023, 1:02오전 UTC](https://forum.developer.hancom.com/t/topic/896/1 "2023-09-01T01:02:39Z")

</div>

예를들어, 특수문자를 입력하는 로직을 수행하고 나서 해당 한글문서의 캐럿으로 포커스가 이동할 수 있을까요?  
현재는 작성중인 프로그램에서는 프로그램의 단추를 클릭해서 특수문자를 입력하고 마우스로 다시 한글에 클릭 해줘야 한글에 입력이 됩니다.  
오토메이션을 사용하는데 직관성이 떨어지는 느낌이라 해당 기능이 필요해 보여서 그렇습니다.

---

<div class="post-metadata">

**Author:** ![bhjung](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.developer.hancom.com/bhjung/32/259_2.png) [@bhjung](https://forum.developer.hancom.com/u/bhjung)\
**Post date:** [9월 1, 2023, 1:18오전 UTC](https://forum.developer.hancom.com/t/topic/896/2 "2023-09-01T01:18:26Z")

</div>

안녕하세요 ~  
오토메이션 API로는 따로 없습니다 .  
따로 한글의 hwnd를 저장해두고 윈도우 API인 SetFocus 를 이용해서 다시 한글에 포커스를 주면 어떨까 싶습니다.  
감사합니다^^

> **[SetFocus function (winuser.h) - Win32 apps](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setfocus)**
>
> Sets the keyboard focus to the specified window. The window must be attached to the calling thread's message queue.
