我使用WinSetTransColor而不是WinSetTransparent,这样透明更柔和
^\::{
active := WinGetTitle("A")
Transparent := WinGetTransparent("A")
If (Transparent = "") {
WinSetTransColor "800050 240", active
}Else If(Transparent = "240"){
WinSetTransColor "800050 200", active
}Else If(Transparent = "200"){
WinSetTransColor "800050 150", active
}Else{
WinSetTransparent "Off", active
}
}
以下是判断为我的电脑时,打开资源管理器透明
if(A_ComputerName="DESKTOP-3O8163I"){
SetTimer WatchForMenu, 777
WatchForMenu()
{
DetectHiddenWindows True ; 可以更早的检测菜单.
if WinExist("ahk_class CabinetWClass")
WinSetTransColor "800050 240" ; 使用上面一行找到的窗口.
}
}
标签:800050,AHK,Else,v2,WinSetTransColor,active,Transparent,置顶,240
From: https://blog.csdn.net/2301_79472946/article/details/137376716