본문 바로가기
Programming/AutoHotKey

[AHk] 구글 검색

by NAMP 2015. 4. 9.

핫키를 등록하고 구글 검색을 합니다. 



; Search highlighted term in Google

#g::

{

bak = %clipboard%

Clipboard =

SetKeyDelay, 40 ; could be set at the top of the script instead.

Send, {ctrl down}{c down}{c up}{ctrl up}

ClipWait, 2

if ErrorLevel

{

   MsgBox, The attempt to copy text onto the clipboard failed.

   return

}

Run, http://www.google.com/search?q=%Clipboard%

clipboard = %bak%

}

Return


핫키로 윈도우+g (Google)를 등록합니다.


Send ^c 를 입력하였을때에 클립보드 복사가 잘 이루어지지 않았습니다. 


SetKeyDelay, 40 ; could be set at the top of the script instead.

Send, {ctrl down}{c down}{c up}{ctrl up}


위와 같이 변경하였습니다. 


댓글