Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

A couple of tools for full screen video. (Think Silverlight)


  • Please log in to reply
No replies to this topic
rockum
  • Members
  • 23 posts
  • Last active: Jul 11 2013 10:50 PM
  • Joined: 20 Dec 2007
*Disclaimer - I had trouble naming these utilities and coming up with a subject line... I am sure the coding is a mess but they work for me.

If you have ever tried to watch full screen videos (Netflix, Fox, NBC etc.) on one monitor while you work on the other you have probably run into the problem that as soon as you activate the work monitor the videos reduce in size. Here are too tools I use that with a bit of fiddling will frequently get the videos in full screen or close to it.

This is easy to use but hard to explain... "Window Proxie" allows you to easily resize and move the video's window to make it bigger than the monitor (I watch on the smaller monitor so it probably still maxes out at the larger monitor size). Happily, I am also finding Window Proxie useful in other situations as well... To use, you simply do to the Window Proxie window what you want done to the target window. Window Proxie transfers the changes made to it's window to the target and then resets itself.

Blackout is simple. I use it to hide Netflix controls. Put the window where you want it and size it to taste. Hit set. When you need to change the settings hover over the window and it will momentarily go away allowing you to do what you need.

WINDOW PROXIE


; _________________________________________________________THE SETUP

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
TheWindowToWorkWith =

; _________________________________________________________PRECENTER THE GUI

SysGet, MonCos, Monitor
MonitorWidth := round(((MonCosRight - MonCosLeft)/2)-250)
MonitorHeight := round(((MonCosBottom - MonCosTop)/2)-150)

; _________________________________________________________THE GUI
Gui, +Resize
Gui, Add, Text, x46 y163 w400 h140 , `n1st - Move this window where you want it anchored; near center works best.`n`n2nd - Set the window to be affected by holding down the control and shift keys while clicking on the target window.`n`n3rd - Move and resize this window in order to transfer movements and resizes to the target window.
Gui, Add, Text, x56 y43 w380 h30 vAWindowName, 
Gui, Add, Text, x56 y113 w80 h30 vAWWidth, 
Gui, Add, Text, x156 y113 w80 h30 vAWHeight, 
Gui, Add, Text, x256 y113 w80 h30 vAWX, 
Gui, Add, Text, x356 y113 w80 h30 vAWY, 
Gui, Add, GroupBox, x46 y93 w100 h60 , Width
Gui, Add, GroupBox, x146 y93 w100 h60 , Height
Gui, Add, GroupBox, x246 y93 w100 h60 , X
Gui, Add, GroupBox, x346 y93 w100 h60 , Y
Gui, Add, GroupBox, x46 y23 w400 h60 , Window To Adjust
Gui, Show, x%MonitorWidth% y%MonitorHeight% h300 w500, WindowProxie
Return
GuiClose:
ExitApp

; _________________________________________________________THE USER TRIGGER

^+Lbutton::
MouseGetPos, , , id, control
WinGetTitle, TheWindowToWorkWith, ahk_id %id%
WinGetPos, WPOX, WPOY, WPOWidth, WPOHeight, WindowProxie        ; window proxies original positions
WinGetPos, AW_X, AW_Y, AW_Width, AW_Height, %TheWindowToWorkWith%
guicontrol,, AWindowName, %TheWindowToWorkWith%
guicontrol,, AWWidth, %AW_Width%
guicontrol,, AWHeight, %AW_Height%
guicontrol,, AWX, %AW_X%
guicontrol,, AWY, %AW_Y%
gui, show
Loop,
{
	Sleep, 200
Gosub, TheLoopedAction
}
Return

; _________________________________________________________THE LOOP

TheLoopedAction:
GetKeyState, state, LButton
if state = D
{
}	
else
{
WinGetPos, WPX, WPY, WPWidth, WPHeight, WindowProxie
XChange := WPX - WPOX
YChange := WPY - WPOY
WChange := WPWidth - WPOWidth
HChange := WPHeight - WPOHeight
FitIt := 0
}
If (XChange = 0)
{
}
else
{
gosub, CertifiedAction
return
}
If (YChange = 0)
{
}
else
{
gosub, CertifiedAction
return
}
If (WChange = 0)
{
}
else
{
gosub, CertifiedAction
return
}
If (HChange = 0)
{
}
else
{
gosub, CertifiedAction
return
}
Return

CertifiedAction:

WWWX := AW_X + XChange
WWWY := AW_Y + YChange
WWWW := AW_Width + WChange
WWWH := AW_Height + HChange

WinMove, %TheWindowToWorkWith%, , %WWWX%, %WWWY% , %WWWW%, %WWWH%

AW_X := WWWX
AW_Y := WWWY
AW_Width := WWWW
AW_Height := WWWH

WinMove, WindowProxie, , %WPOX%, %WPOY% , %WPOWidth%, %WPOHeight%
/*
AW_Width := WWWX
AW_Height := WWWY
AW_X := WWWW
AW_Y := WWWH
WinGetActiveStats, TheWindowToWorkWith, AW_Width, AW_Height, AW_X, AW_Y 
guicontrol,, AWWidth, %AW_Width%
guicontrol,, AWHeight, %AW_Height%
guicontrol,, AWX, %AW_X%
guicontrol,, AWY, %AW_Y%
*/
gui, show

Return

BLACKOUT
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
;	Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; Generated using SmartGUI Creator 4.0
SetYet = No
IniRead, BBOX, blackout.ini, Coords, X, 300
IniRead, BBOY, blackout.ini, Coords, Y, 300
IniRead, BBOW, blackout.ini, Coords, W, 500
IniRead, BBOH, blackout.ini, Coords, H, 100
Gui +Caption +resize +AlwaysOnTop +0x20 ; 0x20=click-thru
Gui, Add, Button, gSetIt X10 y10 w60 h 30, Set It
Gui, Color, 000000
Gui, Show, X%BBOX% y%BBOY% h%BBOH% w%BBOW%, BlackOutWin
Loop
{
sleep, 500
if SetYet = Yes
{
Gosub, CheckToHide
}
Else
{
	}
}
return


GuiClose:
ExitApp

SetIt:
WinGetPos, BBOX, BBOY, BBOW, BBOH, BlackOutWin
;msgbox,,, %BBOX% %BBOX% %BBOX% %BBOX%
Gui, destroy
Gui -Caption -resize -Border +AlwaysOnTop +0x20 ; 0x20=click-thru
Gui, Color, 000000
Gui, Show, x%BBOX% Y%BBOY% w%BBOW% h%BBOH%, BlackedOutWin
IniWrite, %BBOX%, blackout.ini, Coords, X
IniWrite, %BBOY%, blackout.ini, Coords, Y
IniWrite, %BBOW%, blackout.ini, Coords, W
IniWrite, %BBOH%, blackout.ini, Coords, H
Sleep, 4000
SetYet = Yes
Return

CheckToHide:
MouseGetPos, ,  , ID, Control
WinGetTitle, HoveredWindowTitle, ahk_id %id%
if HoveredWindowTitle = BlackedOutWin
{
	sleep, 750
	MouseGetPos, ,  , ID, Control
WinGetTitle, HoveredWindowTitle, ahk_id %id%
if HoveredWindowTitle = BlackedOutWin
{
Gui, destroy
Gui -Caption -resize +Border +AlwaysOnTop +0x20 ; 0x20=click-thru
Gui, Color, 000000
Gui, Add, Button, gQuitIt X10 y10 w100 h30, Quit Black Out
Gui, Show, x%BBOX% Y%BBOY% w120, h50, Would you Like to Quit?
sleep, 3000
Gui, destroy
Gui -Caption -resize -Border +AlwaysOnTop +0x20 ; 0x20=click-thru
Gui, Color, 000000
Gui, Show, x%BBOX% Y%BBOY% w%BBOW% h%BBOH%, BlackedOutWin
}
}
Return

QuitIt:
ExitApp