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

Autoit 현재커셔 텍스트 읽기

데브카페
Devcafe (토론 | 기여)님의 2024년 10월 15일 (화) 01:07 판 (새 문서: <source lang=autoit> HotKeySet("{ESC}", "Terminate") While 1 Sleep(500) GetControlFocus() WEnd Func GetControlFocus() Local $hWinHandle = WinGetHandle("[Active]") Local $sControl = ControlGetFocus($hWinHandle) Local $sText = "The active window handle is: " & $hWinHandle & @CRLF If $sControl <> "" Then $sText &= "The control with focus in the active window is: " & $sControl & @CRLF Local $aPos = ControlGetPos($hWinHandle, "", $sControl)...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
HotKeySet("{ESC}", "Terminate")

While 1
    Sleep(500)
    GetControlFocus()
WEnd

Func GetControlFocus()
    Local $hWinHandle = WinGetHandle("[Active]")
    Local $sControl = ControlGetFocus($hWinHandle)

    Local $sText = "The active window handle is: " & $hWinHandle & @CRLF

    If $sControl <> "" Then
        $sText &= "The control with focus in the active window is: " & $sControl & @CRLF
        Local $aPos = ControlGetPos($hWinHandle, "", $sControl)
        $sText &= "Mouse position: X: " & $aPos[0] & " Y: " & $aPos[1] & @CRLF & "Size: " & $aPos[2] & ", " & $aPos[3]

    Else
        $sText &= "The active window is not giving focus to a control that AutoIt recognizes."
    EndIf

    ToolTip($sText, 0, 0)
EndFunc   ;==>GetControlFocus

Func Terminate()
    Exit
EndFunc   ;==>Terminate

Comments