anonymous1184

https://redd.it/tygm1s/

Apr 8th, 2022 (edited)
1,046
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DllCall("User32\SetWinEventHook"
  2.     , "Int",0x8004 ; EVENT_OBJECT_REORDER
  3.     , "Int",0x8004
  4.     , "Ptr",0
  5.     , "Ptr",RegisterCallback("WindowResize", "F")
  6.     , "Int",0
  7.     , "Int",0
  8.     , "Int",0)
  9.  
  10. return ; End of auto-execute
  11.  
  12. Blank(Set)
  13. {
  14.     if (Set) {
  15.         Gui Blank:New, AlwaysOnTop -Caption -Border
  16.         Gui Color, 0x000000
  17.         Gui Show, NoActivate x1921 y0 w100 h100
  18.     } else {
  19.         Gui Blank:Destroy
  20.     }
  21. }
  22.  
  23. WindowResize(hWinEventHook, event, hWnd) ;, idObject, idChild, idEventThread, dwmsEventTime)
  24. {
  25.     static dimensions := ""
  26.  
  27.     WinGet exe, ProcessName, % "ahk_id" hWnd
  28.     if (exe != "mpv.exe")
  29.         return
  30.     WinGetPos x, y, w, h, % "ahk_id" hWnd
  31.     if (x y w h = dimensions)
  32.         return
  33.     dimensions := x y w h
  34.     isFs := (dimensions = "0019201080")
  35.     Blank(isFs)
  36. }
  37.  
Add Comment
Please, Sign In to add comment