메뉴 여닫기
개인 메뉴 토글
로그인하지 않음
만약 지금 편집한다면 당신의 IP 주소가 공개될 수 있습니다.

커서 위치 추적

데브카페
Devcafe (토론 | 기여)님의 2024년 11월 29일 (금) 08:29 판 (새 문서: <source lang=autoit> ; 초기 커서 위치 설정 Local $iCursorPos = StringLen(ControlGetText($hActiveWindow, "", $hFocusedControl)) ; 커서 이동 후 위치 추적 Func UpdateCursor($iMoveBy) $iCursorPos += $iMoveBy If $iCursorPos < 1 Then $iCursorPos = 1 If $iCursorPos > StringLen(ControlGetText($hActiveWindow, "", $hFocusedControl)) Then $iCursorPos = StringLen(ControlGetText($hActiveWindow, "", $hFocusedControl)) Return $iCursorPos EndFunc </source> [...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

; 초기 커서 위치 설정
Local $iCursorPos = StringLen(ControlGetText($hActiveWindow, "", $hFocusedControl))

; 커서 이동 후 위치 추적
Func UpdateCursor($iMoveBy)
    $iCursorPos += $iMoveBy
    If $iCursorPos < 1 Then $iCursorPos = 1
    If $iCursorPos > StringLen(ControlGetText($hActiveWindow, "", $hFocusedControl)) Then $iCursorPos = StringLen(ControlGetText($hActiveWindow, "", $hFocusedControl))
    Return $iCursorPos
EndFunc

Comments