前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >模拟Windows 7 AeroPeek效果的小工具(0.1 alpha)

模拟Windows 7 AeroPeek效果的小工具(0.1 alpha)

作者头像
贰师兄TEN
发布2020-12-08 10:46:00
4260
发布2020-12-08 10:46:00
举报
文章被收录于专栏:Revel World

天气不好,用AHK写个小软件玩玩,见笑了。

写了一个模拟windows7的窗口透明效果(AeroPeek)。

网上流传的老外写的一个软件,需要.net 3.5,而且很占系统资源。

还很粗糙,请达人改造指正。

*bug issue:会导致 qq音乐桌面歌词变黑。

############

版本: V0.1 功能: 鼠标悬停在任务栏下方,自动引发flip 3d (VISTA)。 在屏幕右下角点击,窗口透明化,可以看到桌面 (XP,VISTA)。 截图:

http://dl.getdropbox.com/u/220429/aeropeek_sim.png 下载: http://dl.getdropbox.com/u/220429/Autohide_V0.1.rar 包括脚本源代码和可执行文件。

代码:

代码语言:javascript
复制
;Desktop Utility
;bsmagic
;2009
;v0.01
#Persistent
#SingleInstance,Force
SetWinDelay,0
SetBatchLines,-1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
x2:=A_ScreenWidth-5
y2:=A_ScreenHeight-3
time_cum_flip=0
;menu ,tray,NoStandard
menu ,tray,add
menu ,tray,icon,shell32.dll,049,1
CoordMode ,mouse,screen
SetTimer, CheckMouse2, 250

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

~LButton::
    MouseGetPos,x,y
    if(x>=x2 and y>=y2) {
    ;    run,"%A_WorkingDir%\showdesktop.scf"
        TransAll()
    }
Return
~LButton UP::
    MouseGetPos,x,y
    if(x>=x2 and y>=y2) {
    ;    run,"%A_WorkingDir%\showdesktop.scf"
        UnTransAll()
    }
Return
CheckMouse2:
    MouseGetPos,x,y
    if(y>=y2 and x<=x2) {
        time_cum_flip+=250
        if(time_cum_flip>=1000) {
            run,"%A_WorkingDir%\Flip 3d.lnk"
            time_cum_flip=0
        }
    }else{
            time_cum_flip=0
    }
return

UnTransAll() {
    WinGet,id_,List,,,Program Manager
    Loop,%id_%
    {
      StringTrimRight,id,id_%A_Index%,0
      WinGetClass,class,ahk_id %id%
          if(class="Shell_TrayWnd" or class="Progman" or class="kfwindow" or class="Button") {
      }else{
        WinSet,Transparent,Off,ahk_id %id%
      }
    }
    ;WinSet,Transparent,Off,ahk_class Progman
    ;WinSet,Transparent,0,ahk_class Button
}
TransAll(){
    WinGet,id_,List,,,Program Manager
    id:=0
    trans=50
    Loop,%id_%
    {
      StringTrimRight,id,id_%A_Index%,0
      WinGetClass,class,ahk_id %id%
      if(class="Shell_TrayWnd" or class="Progman" or class="kfwindow" or class="Button") {
      }else{
        WinSet,Transparent,%trans%,ahk_id %id%
      }
    }
    WinGet,id,Id,A
    WinGetClass,class,ahk_id %id%
    WinSet,Transparent,Off,ahk_id %id%
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;参考
;TransOther.ahk
; Make transparent all but the active window
;Skrommel @ 2005

;Win7 Appin show desktop
;Appin Sfufoet  逍遥猪葛亮
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2009-04-06 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档