Skip to content
조회 수 21412 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

simulate CTRL+C

AutoHotKey Postmessage(SendMessage)로 Ctrl+C 전송하기

ASCII CODE에서 십진수 : Ctrl-A ~~~ 26 : Ctrl-Z


postmessage, 0x100, 3, 0, Edit1,  제목 없음 - 메모장  => ctrl+c 동작을 확인하였습니다. 



간편한 복사, 붙여넣기는 

postmessage, 0x300, 1, 0, Edit1,  제목 없음 - 메모장 
잘라내기 
postmessage, 0x301, 1, 0, Edit1,  제목 없음 - 메모장 
복사 
postmessage, 0x302, 1, 0, Edit1,  제목 없음 - 메모장 
붙여넣기 


1. PostMessage로 WM_KEYDOWN, WM_KEYUP을 잘 조합해서 보내기
2. 해당 어플리케이션을 최상위로 올린 후 Keybd_Event, SendInput 사용하기
3. SendMessage로 WM_PASTE 보내기



Hi,
I have an application and I want to simulate CTRL+C in a window, the application is in VC++.
I think that I have to write something like that, but it doesn't copy

::PostMessage(win,WM_KEYDOWN,VK_CONTROL,0x10FF);
::PostMessage(win,WM_KEYDOWN,VkKeyScan('c'),0);
::PostMessage(win,WM_KEYUP,VkKeyScan('c'),0);
::PostMessage(win,WM_KEYUP,VK_CONTROL,0x10FF);



I'm working on an automation application for a proprietary windows-based host emulator in Windows XP.  The application is written in VB6 and works well at passing keys to the host emulator using WM_KEYDOWN messages via PostMessage API calls.  The problem that I have is that I don't know how to send keys that have a Shift/Ctrl/Alt component.  For example, the following works great:

     PostMessage hWnd, WM_KEYDOWN, vbKeyC, &H1&                    '  Lowercase "c"
     PostMessage hWnd, WM_KEYDOWN, vbKeyUp, &H1&                  '  Up Arrow key
     PostMessage hWnd, WM_KEYDOWN, vbKeyPageDown, &H1&       '  Page Down key

How do I do the same for Shift-c (Capital C), Shift-ArrowUp, Ctrl-PgDn, or Alt-c?  Posting a WM_KEYDOWN message for vbKeyShift/vbKeyControl has no effect before any of the above.  The result is the same (unshifted).

Before anyone asks, I do not wish to change the focus from my application to the host when sending each key.  (The application controls several host windows at the same time.)  PostMessage does exactly what I want, except I can't figure out how to Shift/Ctrl/Alt the keys.

Any help would be appreciated...


http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20757153.html

로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
157 컴퓨터잡담 Windows Movie Maker 2.1 다운로드 2 2 file 2010.09.11 22457
156 컴퓨터잡담 XP윈도우가 버벅 거릴때 시스템 파일 복구하기 1 2010.09.11 11273
155 컴퓨터잡담 동영상 제작프로그램, 파워디렉터(POWER DIRECTOR) 1 2 2010.09.10 20214
154 컴퓨터잡담 이전 버전의 Office로 Office 2007 파일을 여는 방법 1 2010.09.04 11301
153 컴퓨터잡담 Excel에서 틀 고정 방법 2010.09.04 18628
152 컴퓨터잡담 아파치서버에서 시작시 무엇을 불러들이나? httpd -l 1 2 2010.09.04 9780
151 컴퓨터잡담 [악성코드제거] 가짜백신에 속지말고 MS정품을 이용하자. 2010.09.02 10318
150 컴퓨터잡담 무선랜 비밀번호 모음 3 2010.08.26 16895
149 컴퓨터잡담 [악성코드] 컴퓨터가 주기적으로 꺼지는 현상 2 2010.08.24 12217
148 컴퓨터잡담 hMailServer - 설치시 주의 핵심사항 1 2010.08.24 103068
147 컴퓨터잡담 [윈도우 웹서버] hmailserver 1 1 2010.08.22 23389
146 컴퓨터잡담 부팅시마다 체크디스크 실행되는 경우 설정방법 2010.08.21 26563
145 컴퓨터잡담 Tips N Tricks Process Listing - Using third party DLL! 2010.08.14 20424
144 컴퓨터잡담 [autohotkey] 시스템 레지스트리 수정, 삭제 2010.08.14 8486
143 컴퓨터잡담 [autohotkey] 시스템 레지스트리 수정, 삭제 1 3 2010.08.14 8062
142 컴퓨터잡담 [잦은오류해결] 오류발생을 알려주는 drwtsn32.exe 때문에 다운? 차라리 없애버리자. 2010.08.12 5838
141 컴퓨터잡담 [악성코드퇴치] 악성코드 처리 방법 1 2010.08.12 9902
140 컴퓨터잡담 [악성코드퇴치] hosts 파일로 경로납치 현상 방지 1 2010.08.12 14026
139 컴퓨터잡담 [악성코드퇴치] NSLOOKUP 경로 확인으로 가로채기 하기 1 2010.08.12 14605
138 컴퓨터잡담 악성코드 mus.exe 제거하기 2010.08.11 16034
Board Pagination Prev 1 ... 37 38 39 40 41 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소