How to make a Borderless-AlwaysOnTop [NOT FULLSCREEN]?
How to make a Borderless-AlwaysOnTop [NOT FULLSCREEN]?
Im kinda new to autohoteky so i dont really know much. Probably a bare minimum so i think i need a walkthrough or tutorial or even better a complete script. But i'm willing to learn. Anyways, i found a simple script which enables a window that u select to always stay on top. It works beautifully. So i was wondering if i could step it up a bit like making the top window borderless. I'm trying to recreate something like the small window in skype or the small video windows on tablet where if u were watching a video and u switched apps, the video would still be there just on top, smaller and borderless. So i was wondering if that was possible. Thanks in advance to the autohotkey community who decides to help
Re: How to make a Borderless-AlwaysOnTop [NOT FULLSCREEN]?
This is a function I use for doing a full screen Borderless window, modifying it for your needs shouldn't be too difficult, just remove or comment out the WinMove line or change it's parameters to what you want for the windows position & size. You will also need to add the always on top part.
Just be aware that while playing around with it, you might want a hotkey set to the TitleBar() function as well which will toggle the tittle bar on/off, allowing you to get back some control of the effected window (like dragging, resizing etc).
Just be aware that while playing around with it, you might want a hotkey set to the TitleBar() function as well which will toggle the tittle bar on/off, allowing you to get back some control of the effected window (like dragging, resizing etc).
Code: Select all
BorderlessWindow(WinTitle:="")
{
If (WinTitle == "")
WinGetTitle, WinTitle, A
IfWinExist %WinTitle%
{
WinSet, Style, -0xC00000, %WinTitle% ; hide title bar
WinSet, Style, -0x800000, %WinTitle% ; hide thin-line border
WinSet, Style, -0x400000, %WinTitle% ; hide dialog frame
WinSet, Style, -0x40000, %WinTitle% ; hide thickframe/sizebox
WinMove, %WinTitle%, , 0, 0, 1920, 1080
}
Return
}
TitleBar(WinTitle:="")
{
If (WinTitle == "")
WinGetTitle, WinTitle, A
IfWinExist %WinTitle%
WinSet, Style, ^0xC00000, %WinTitle% ; toggle title bar
Return
}
Re: How to make a Borderless-AlwaysOnTop [NOT FULLSCREEN]?
ZaiRift wrote:Im kinda new to autohoteky so i dont really know much. Probably a bare minimum so i think i need a walkthrough or tutorial or even better a complete script. But i'm willing to learn. Anyways, i found a simple script which enables a window that u select to always stay on top. It works beautifully. So i was wondering if i could step it up a bit like making the top window borderless. I'm trying to recreate something like the small window in skype or the small video windows on tablet where if u were watching a video and u switched apps, the video would still be there just on top, smaller and borderless. So i was wondering if that was possible. Thanks in advance to the autohotkey community who decides to help
#NoEnv Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn Enable warnings to assist with detecting common errors.
; SendMode Input Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% Ensures a consistent starting directory.
^SPACE::
WinSet, AlwaysOnTop, ON, A
WinGet, id1, ID, A
WinSet, Style, -0xC00000, ahk_id %id1%
WinSet, Style, ^0x40000, ahk_id %id1%
WinMinimize, ahk_id %id1%
WinActivate, ahk_id %id1%
Return
Who is online
Users browsing this forum: FanaticGuru, filipemb, LRRUNB and 219 guests