|
发表于 2009-5-9 22:58:23
|
显示全部楼层
每周任务B,完成。请指教..
#include <Misc.au3>
TrayTip ( "每周任务B", "当按住CTRL键时,如果鼠标指针在屏幕右上角则最小化当前窗口,左上角时则关闭当前窗口,左下角时则隐藏当前窗口,右下角时显示隐藏的窗口.alt+d退出",60)
While 1
sleep (100)
$xy=MouseGetPos()
$title = WinGetTitle("", "")
$Handle = WinGetHandle ($title, "")
If _IsPressed("11", "user32.dll") And $xy[0] <50 And $xy[1] <50 Then ;左上角时则关闭当前窗口
IF $title <> "Program Manager" Then WinClose ($title, "")
Endif
IF _IsPressed("11", "user32.dll") And $xy[0] < 50 And $xy[1] > int (@DesktopHeight - 50) Then ;左下角时则隐藏当前窗口
IF $title <> "Program Manager" Then WinSetState ( $title, "", @SW_HIDE)
Endif
IF _IsPressed("11", "user32.dll") And $xy[0] > int (@DesktopWidth - 50) And $xy[1] > int (@DesktopHeight - 50) Then ;右下角时显示隐藏的窗口
IF $title <> "Program Manager" Then WinSetState ( $title, "", @SW_SHOW)
Endif
IF _IsPressed("11", "user32.dll") And $xy[0] > int (@DesktopWidth - 50) And $xy[1] < int (@DesktopHeight - 50) Then ;右上角则最小化当前窗口
IF $title <> "Program Manager" Then WinSetState ( $title, "", @SW_MINIMIZE)
Endif
HotKeySet ( "!d", "ext")
WEnd
func ext()
TrayTip( "每周任务B", "你选择了退出哦",2)
sleep(2000)
exit
endfunc |
评分
-
查看全部评分
|