Log in

View Full Version : [HotKeyNet] Need help with HotKeyNet PiP (picture in picture)



perr0
07-21-2016, 10:41 PM
Hi, I've followed some guides on the forum and got to the following code to set my PiP up.
I'm using 1 computer running 2 clients.


// SET PIP CONFIGURATION// Usage: <SetPip BigWindowName LittleWindowName>
// This command is called by <Hotkey F1> which is defined below.
//-------------
<Command SetPip>
<TargetWin %1%>
<SetWinSize 1360 768>
<SetWinPos 0 0> // THIS IS ONLY HALF OF IT, YOU NEED THE NEXT PART, TOO
<SetWinRegion 900 215 400 300> // THIS IS THE HOLE YOU NEED TO PUNCH IN THE MAIN WINDOW
<SetForegroundWin>
<TargetWin %2%>
<SetWinSize 400 300>
<SetWinPos 900 215>
<SetForegroundWin>
<UpdateWin>
<TargetWin %1%>
<SetForegroundWin>
<UpdateWin>


//------------
// TOGGLE PIP CONFIG WITH HOTKEY
//------------
<Hotkey ScrollLockOn F1> // THIS IS WHERE YOU DEFINED F1
<Toggle>
<SetPip WoW1 WoW2>
<Toggle>
<SetPip WoW2 WoW1>

I'm having several issues, turning this functionality not usable:
1 - Small window does not sit properly on top of hole in main window
2 - Even if I move small window to fit into hole, once I activate main window to actually play, small window disappears
3 - Graphics in main window does not take whole window area
4 - Main window size keeps reducing as I switch Main/Slave using F1
5 - Main window flickers

perr0
07-21-2016, 10:57 PM
Screenshot to show how messy things look.

1728

Note that the region below and to the right of WoW main window are not actual open windows from other programs, it's unused area form the main WoW window.

mbox_bob
07-21-2016, 11:25 PM
1 - You probably need to remove the window frames.
2 - Because your "hole" hasn't been created. Most of the scripts I've seen make the two windows first, then go back to and retarget %1% to generate the hole. There may be some requirement for the ordering of things to occur, like having something to fill the hole? - Not that I can find any confirmation on that, just purely observation of various scripts.
3 - Make sure the game is in Windowed mode.
4 - Yes it does, because you are changing the size of the Window that the game is in, so it resizes..
5 - No idea, possibly something else going on, although the Windowed mode thing seems to come up again.

There is a quick demo script on the hotkeynet site, which has a good example. http://hotkeynet.com/wow/wow-pip.html

perr0
07-22-2016, 12:36 AM
Thanks for the reply.
1 - Tried removing frames, same result.
2 - Tried with different sequence, same result.
3 - It is in windowed mode.
4 - OK.

Did some tests with the code below, which allows me to turn PiP on and off and check behavior.

//----------------------------------------------------------------// TOGGLE PIP WINDOW (TURN HOLE ON AND OFF)
//----------------------------------------------------------------
<Hotkey ScrollLockOn Ctrl P>
<Toggle>
<TargetWin WoW1>
<SetWinRegion none>
<TargetWin WoW2>
<SetWinRegion none>
<Toggle>
<If WinSizeIs WoW1 1000 600>
<TargetWin WoW1>
<SetWinRegion 300 300 200 100>
<Else>
<TargetWin WoW2>
<SetWinRegion 300 300 200 100>

// SET PIP CONFIGURATION
// Usage: <SetPip BigWindowName LittleWindowName>
// This command is called by <Hotkey F1> which is defined below.
//-------------
<Command SetPip>
<TargetWin %2%>
<SetWinSize 200 100>
<SetWinPos 300 300>
<TargetWin %1%>
<SetWinPos 50 50>
<SetWinSize 1000 600>
<TargetWin %2%>
<SetForegroundWin>
<UpdateWin>
<TargetWin %1%>
<SetForegroundWin>

Results with PiP on and off on the screenshots. You can notice that when PiP is on, not only the hole show up (as expected) but also a strip from right side and bottom of screen is removed as well. Maybe some incompatibility with my drive or Win10?

1729

1730

mbox_bob
07-22-2016, 12:41 AM
Maybe you have display scaling set to something other than 100% ??
www.tenforums.com/tutorials/5990-dpi-scaling-level-displays-change-windows-10-a.html (http://www.tenforums.com/tutorials/5990-dpi-scaling-level-displays-change-windows-10-a.html)
Other than that, I'm not really sure. The banding is implying some forced resolution which is not matching the aspect ratio of your window regions... I'm no expert in HKN, so I'm not sure what else to look for.

perr0
07-22-2016, 01:48 AM
WOW! You nailed it!

For whatever reason, my laptop had 125% scaling -- and it's says it's recommended. Setting it to 100% fixed everything.

Thanks a lot!

Ughmahedhurtz
07-22-2016, 02:17 AM
WOW! You nailed it!

For whatever reason, my laptop had 125% scaling -- and it's says it's recommended. Setting it to 100% fixed everything.

Thanks a lot!

Yeah, that is a pain with the newer "high DPI" laptops. My Zenbook has some crazy high setting due to 4k display, which at 100% would be completely unreadable by anyone that isn't under 12 and wearing 3-power reading glasses.

perr0
07-22-2016, 07:50 AM
Yeah, that is a pain with the newer "high DPI" laptops. My Zenbook has some crazy high setting due to 4k display, which at 100% would be completely unreadable by anyone that isn't under 12 and wearing 3-power reading glasses.

Luckily, mine is not so bad at 100%, so I can live with it. What do you do in your case? Have you tried setting PiP on your laptop?

Ughmahedhurtz
07-22-2016, 01:15 PM
Luckily, mine is not so bad at 100%, so I can live with it. What do you do in your case? Have you tried setting PiP on your laptop?

I just dropped the resolution to 1080p, which is 4 physical pixels per virtual pixel. Looks good enough, runs cooler/faster and doesn't show those funky control issues that crop up with scaling enabled.

[edit] Two guys in the office got 4k displays recently; one's on a Macbook Pro, other is on an HP linux i7 machine. Both of them spin the GPU fans at like 80% all the time. Mine purrs along at zero fan noise and ~4.5 hours of battery life. It's been a nice change.