#NoEnv #SingleInstance Force #Persistent CoordMode, Pixel, Screen CoordMode, Mouse, Screen CoordMode, ToolTip, Screen SetTitleMatchMode, 2 SetBatchLines,-1 ~$RButton:: ; 앱플레이어에서 오른클릭시 좌클릭 연타 IfWinActive,ahk_class Qt5QWindowIcon { while ( GetKeyState("RButton","P") ){ if ( A_index > 2 ) SendInput, {LButton} Sleep,50 } } return ~^#LButton UP:: ; 윈도우키와 컨트롤키를 누르고 좌클릭시 모든 앱플레이어에서 같은 위치를 클릭 multiClick() return multiClick() { IfWinActive, ahk_class Qt5QWindowIcon { static x,y,wh,mX,mY,Lists,hWnd GetClietPos(x,y,w,h) WinGet, Lists, List, ahk_class Qt5QWindowIcon MouseGetPos, mX,mY Loop,% ( Lists ) { hWnd := Lists%A_Index% if ( hWnd <> WinExist("A") ) postClickWin(floor(w*Round((mX-x)/w,2)),floor(h*Round((mY-y)/h,2)),1,hWnd) } } } postClickWin(pX,pY,cnt,hwnd){ static rx,ry,rw,rh ControlGetPos, rx,ry,rw,rh,subWin1,% "ahk_id " hwnd pX:=pX+rx pY:=pY+ry Loop, %cnt% { PostMessage, 0x201, 0x0001, ((pY*65536)+pX),, ahk_id %hwnd%,sub ;WM_LBUTTONDOWN Sleep,20 PostMessage, 0x202 , 0, ((pY*65536)+pX),, ahk_id %hwnd%,sub ;WM_LBUTTONUP Sleep, 50 } } GetClietPos(ByRef x, ByRef y, ByRef w, ByRef h) { static rx,ry,rw,rh,tx,ty,tw,th ControlGetPos, rx,ry,rw,rh,subWin1,% "ahk_id " WinExist("A") WinGetPos, tx,ty,tw,th,% "ahk_id " WinExist("A") x:=tx+rx y:=ty+ry w:=rw h:=rh }