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

Autoit 선택된 문자 복제 함수

DB CAFE

autoit 선택된 문자 복제 함수

  • msdn 함수
Sub GetSelectedText()

      On Error Resume Next
      Err.Clear

      Dim oText As TextRange

      ' Get an object reference to the selected text range.
      Set oText = Activewindow.Selection.TextRange

      ' Check to see whether error occurred when getting text object
      ' reference.
      If Err.Number <> 0 Then

         MsgBox "Invalid Selection. Please highlight some text " _
            & "or select a text frame and run the macro again.", _
            vbExclamation
         End

      End If

      ' Display the selected text in a message box.
      If oText.Text = "" Then
         MsgBox "No Text Selected.", vbInformation
      Else
         MsgBox oText.Text, vbInformation
      End If

   End Sub