Looking for an alternative way to overlay a window.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
PerksPlus
Posts: 1
Joined: 05 Mar 2016, 00:04

Looking for an alternative way to overlay a window.

05 Mar 2016, 00:25

I'm trying to stream with a single monitor on twitch.I'm using AHK for this script that makes my chat window always on top of my game and clicks fall through. Currently I'm using this script.

Code: Select all

#InstallKeybdHook
#SingleInstance force

!a:: ; Toggle onTop
WinGet, currentWindow, ID, A
WinGet, ExStyle, ExStyle, ahk_id %currentWindow%
if (ExStyle & 0x8)  ; 0x8 is WS_EX_TOPMOST.
{
	Winset, AlwaysOnTop, off, ahk_id %currentWindow%
	Sleep, 1500
}
else
{
	WinSet, AlwaysOnTop, on, ahk_id %currentWindow%
		Sleep, 1500
}
return
!x:: ; Make window click through
WinGet, currentWindow, ID, A
WinSet, ExStyle, +0x80020, ahk_id %currentWindow%
return

!z::
MouseGetPos,,, MouseWin ; Gets the unique ID of the window under the mouse
WinSet, ExStyle, -0x80020, ahk_id %currentWindow%
Return
This all works fantastically, except that making the window click through seems to take up a lot of resources. I get around half the FPS I normally do while the window is on top and click through. I'm looking for a way to do this that doesn't impact my games so much. If anyone has some ideas on a more efficient way to get the same effect it would be much appreciated.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 334 guests