예를 다음과 같이 드래곤 NaturallySpeaking의 고급 스크립팅을 사용하여 클립 보드에 활성화 된 윈도우의 제목을 복사 할 수 있습니다 :
'
' get window title
'
Sub Main
Clipboard (GetWindowTitle)
End Sub
'
' Use these Windows Functions for Getting an active Window title
'
Declare Function GetForegroundWindow Lib "user32"() As Long
'
Declare Function GetWindowText Lib "user32" _
Alias "GetWindowTextA" (ByVal hwnd As Long , _
ByVal lpString As String , ByVal cch As Long) As Long
'
' GetWindowTitle
' (Gets an active Window title)
'
Function GetWindowTitle() As String
Dim x As Integer
Dim TitleText As String * 300
Dim hw As Long
hw = GetForegroundWindow()
x = GetWindowText (hw , TitleText , Len (TitleText))
GetWindowTitle = Trim (Left (TitleText , x))
End Function
'
을 지금, 나는 다른과 (글로벌 '#Uses 파일에 모든 기능을 유지 선언, 함수 및 전역 상수, 등), 그래서 난 그냥 메인 하위 부분이 필요하지만, 참조 된 모든 기능과 선언을 하나의 스크립트에 넣을 수 있습니다.
제 H
대답입니다 예 그 동안, 당신은 (어떤 단축키를 트리거 할 필요없이 AHK 스크립트를 실행 "에서 ShellExecute"을 사용하여 AHK 스크립트를 불러 고급 스크립팅을 사용할 수 있지만 (나는 방법을 곧 게시 할 예정입니다) AHK에 일부 명령 행 매개 변수를 전달할 수도 있습니다). http://www.knowbrainer.com/forums/forum/messageview.cfm?catid=25&threadid=22676&discTab=true&messid=130757&parentid=130734&FTVAR_FORUMVIEWTMP=Single (그리고 PG LTU는 저입니다)을 확인하십시오. – PGilm
@PGilm 고마워, 잘 알고있어! –