0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AHK(AutoHotkey)を使い Shift + マウス右 → aキー → パスとしてコピー を Alt + ; で実現する

Last updated at Posted at 2019-06-10

IMEGetstateOFF(){
DetectHiddenWindows, ON
WinGet, vcurrentwindow, ID, A
vgetdefault := DllCall("imm32.dll\ImmGetDefaultIMEWnd", "Uint", vcurrentwindow)
vimestate := DllCall("user32.dll\SendMessageA", "UInt", vgetdefault, "UInt", 0x0283, "Int", 0x0005, "Int", 0)
DetectHiddenWindows, Off
If (vimestate=0) ;imeがoffなら
{
;Offだから何もしない
}
else
{
Send, {vkf3}
}
return
}

IMEGetstateON(){
DetectHiddenWindows, ON
WinGet, vcurrentwindow, ID, A
vgetdefault := DllCall("imm32.dll\ImmGetDefaultIMEWnd", "Uint", vcurrentwindow)
vimestate := DllCall("user32.dll\SendMessageA", "UInt", vgetdefault, "UInt", 0x0283, "Int", 0x0005, "Int", 0)
DetectHiddenWindows, Off
If (vimestate=0) ;imeがoffなら
{
Send, {vkf3}
}
else
{
;Onだから何もしない
}
return
}

;------------
;Shift + マウス右 → aキー → パスとしてコピー
!;:: ; Alt+;
;------------

IMEGetstateOFF()
Sleep,300

Send {Blind}{Shift Down}
MouseClick, right
Sleep,300
Send ,a
Sleep,100
Send {Shift Up}

IMEGetstateON()
Sleep,300

MsgBox, Ctrl + v で「貼り付け」してください。

Return

【IMEのON,OFF操作を参考にさせていただいたサイト】
https://qiita.com/neokix/items/83ac2ac8e1dd405528b0

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?