Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- #Persistent
- SetTitleMatchMode, 2
- SetTimer, tableDiff, 10
- firstRun := 0
- CoordMode, Mouse, Screen
- return
- tableDiff:
- if (firstRun <> 0)
- {
- winUnderMouseLast := winUnderMouseCurrent
- WinActivate, %winUnderMouseLast%
- WinGetTitle, titleLast, ahk_id %winUnderMouseLast%
- WinGetClass, classLast, ahk_id %winUnderMouseLast%
- WinGetPos, xLast, yLast, wLast, hLast, ahk_id %winUnderMouseLast%
- }
- else
- msgbox, 1st run
- MouseGetPos,,,winUnderMouseCurrent
- WinActivate, %winUnderMouseCurrent%
- WinGetTitle, titleCurrent, ahk_id %winUnderMouseCurrent%
- WinGetClass, classCurrent, ahk_id %winUnderMouseCurrent%
- WinGetPos, xCurrent, yCurrent, wCurrent, hCurrent, ahk_id %winUnderMouseCurrent%
- If (winUnderMouseLast != winUnderMouseCurrent)
- {
- winMove, %titleLast%,,%xLast%,%yLast%
- ;msgbox, Current %titleCurrent% Last %titleLast%
- WinMove, %titleCurrent%,, 421, 156, 1016, 727
- ;msgbox, %titleLast%,%xLast%,%yLast%
- }
- firstRun := 1
- return
Advertisement
Add Comment
Please, Sign In to add comment