I am trying to get a script which helps me make all windows stay always on top and clicking middle mouse button on the title bar disables it. I was able to modify the script of CClose made by Chahoe Shi but the problem is the script gets applied only if i middle click on each window. I want all the windows with this script activated and then disable the ones which i don't.
Disclaimer : This script is not owned by me and the owner is Chahoe Shi.
Always on Top - Custom Script
-
- Posts: 1
- Joined: 30 Jul 2021, 10:36
Always on Top - Custom Script
- Attachments
-
- CClose.ahk
- (15.39 KiB) Downloaded 20 times
Last edited by gregster on 30 Jul 2021, 12:07, edited 2 times in total.
Reason: Topic moved from 'Wish List'.
Reason: Topic moved from 'Wish List'.
Re: Always on Top - Custom Script
Code: Select all
WinGet, win, List
Loop, %win% {
WinGetTitle, wTitle, % winTitle := "ahk_id " win%A_Index%
WinGet, proc, ProcessName, %winTitle%
If visible(winTitle) && wTitle > "" && proc != "Explorer.EXE"
WinSet, AlwaysOnTop, On, %winTitle%
}
SoundBeep, 1500
~MButton::
CoordMode, Mouse
MouseGetPos, xpos, ypos, uid
SendMessage, 0x84,, ypos << 16 | xpos,, ahk_id %uid%
If (ErrorLevel != 2)
Return
WinSet, AlwaysOnTop, Off, ahk_id %uid%
SoundBeep, 1500
Return
visible(winTitle) {
WinGet, thisStyle, Style, %winTitle%
Transform, visible, BitAnd, %thisStyle%, 0x10000000 ; 0x10000000 is WS_VISIBLE.
Return visible
}