Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SetTitleMatchMode,RegEx
- #IfWinActive, ^.*?VLCメディアプレイヤー$ ; ahk_class Qt5QWindowIcon
- ~LButton::
- MouseGetPos, , , , get_Control
- if RegExMatch(get_Control, "VLC video output.*?$") || RegExMatch(get_Control, "VLC video main.*?$") { ;再生画面限定
- KeyWait, LButton, T0.2 ;時間調整(初期値:0.2秒)
- if (! ErrorLevel) { ;マウス左ボタン押下→0.2秒以内に押し上げでスペースキー送出(一時停止)
- Send, {Space}
- } else { ;マウス左ボタン押下→0.2秒以上押し続けてそのまま移動でVLCウインドウ移動
- CoordMode,Mouse
- SetWinDelay, 0
- If DoubleAlt
- {
- MouseGetPos,,,KDE_id
- PostMessage,0x112,0xf020,,,ahk_id %KDE_id%
- DoubleAlt := false
- return
- }
- MouseGetPos,KDE_X1,KDE_Y1,KDE_id
- WinGet,KDE_Win,MinMax,ahk_id %KDE_id%
- If KDE_Win
- return
- WinGetPos,KDE_WinX1,KDE_WinY1,,,ahk_id %KDE_id%
- Loop
- {
- GetKeyState,KDE_Button,LButton,P
- If KDE_Button = U
- break
- MouseGetPos,KDE_X2,KDE_Y2
- KDE_X2 -= KDE_X1
- KDE_Y2 -= KDE_Y1
- KDE_WinX2 := (KDE_WinX1 + KDE_X2)
- KDE_WinY2 := (KDE_WinY1 + KDE_Y2)
- WinMove,ahk_id %KDE_id%,,%KDE_WinX2%,%KDE_WinY2%
- }
- }
- }
- return
- #If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement