介绍

脚本位置点这里

这是十分实用的脚本,可以在整个应用界面范围内拖动界面,而不局限于顶部一小块区域。

使用

  • <^<!LButton -> 拖动窗口。
  • 以上条件下双击 -> 最大化窗口。

脚本

*<+<!LButton:: {
  CoordMode "Mouse", "Screen"
  MouseGetPos(&px, &py), WinGetPos(&wx, &wy, , , 'A')
  dx := wx - px, dy := wy - py
  SetWinDelay -1
  While GetKeyState("LButton", "P")
    MouseGetPos(&nx, &ny), WinMove(nx + dx, ny + dy, , , "A")
  if (A_ThisHotkey = A_PriorHotkey && A_TimeSincePriorHotkey < 300)
    try WinMaximize('A')
}

使用PostMessage

具体传递值的意思需要看msdn文档,有兴趣可以去看看。

OnMessage(0x0201, (*) => PostMessage(0xA1, 2))
posted on 2023-07-09 13:01  落寞的雪  阅读(212)  评论(0编辑  收藏  举报