[系统]显示隐藏整个任务栏

F8显示为带拉伸桌面效果的! NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; R

显示隐藏整个任务栏

使用方法:

  • 保存后直接运行就能看到效果!
  • F8显示为带拉伸桌面效果的!
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

hw_tray := DllCall( "FindWindowEx", "uint",0, "uint",0, "str","Shell_TrayWnd", "uint",0 )
MsgBox, % hw_tray
WinHide, ahk_id %hw_tray%
MsgBox, 隐藏
WinShow, ahk_id %hw_tray%
MsgBox, 显示
return

;~ 简单版
WinHide ahk_class Shell_TrayWnd   ;隐藏任务栏
WinShow ahk_class Shell_TrayWnd  ;显示任务栏

;可以拉伸桌面的版
F8::
	VarSetCapacity( APPBARDATA, 36, 0 )
	IfWinNotExist, ahk_class Shell_TrayWnd
	{
		NumPut( (ABS_AlwaysOnTOP := 0x2), APPBARDATA, 32, "UInt" )           ;Enable "Always on top" (& disable auto-hide)
		DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
		WinShow ahk_class Shell_TrayWnd
	}
	else
	{
		NumPut( ( ABS_AUTOHIDE := 0x1 ), APPBARDATA, 32, "UInt" )            ;Disable "Always on top" (& enable auto-hide to hide Start button)
		DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
		WinHide ahk_class Shell_TrayWnd
	}

return

 

亲爱的朋友们,如果你认为本站不错请打赏,我们非常感谢你的支持!

[su_button url=”http://www.autoahk.com/buyamoney” style=”3d” color=”#ffe41c” size=”20″ radius=”round”]赏[/su_button]



声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA捐赠
共{{data.count}}人
人已捐赠
其他

[托盘管理]为AutoHotkey的托盘图标增加左键单击、双击事件动作

2017-3-9 20:26:00

其他

[对象]利用Shell.Application对象批量改名

2017-4-10 16:16:32

3 条回复 A文章作者 M管理员
  1. iuy

    直接复制代码吗

  2. TIAMO

    按那个按键啊

    • hexuren

      F8

❯
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索