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

天气不好,用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
包括脚本源代码和可执行文件。

代码:

 

ContractedBlock.gif ExpandedBlockStart.gif Code
;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  逍遥猪葛亮

 

转载于:https://www.cnblogs.com/bsmagic/archive/2009/04/06/1430490.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值