多坐标提示

mt_mousetip(500, 500, 10, 10, 5000)
mt_mousetip(600, 500, 10, 10, 5000)
mt_mousetip(700, 500, 10, 10, 5000)
mt_mousetip(800, 500, 10, 10, 5000)
mt_mousetip(900, 500, 10, 10, 5000)
p1 := mt_mousetip(1000, 500, 10, 10)
sleep,2000
p1.stop()
mt_mousetip(x := 0, y := 0, w := 10, h := 10, show_time := 999999999)
{
  return new muti_mousetip(x, y, w, h, show_time)
}
class muti_mousetip 
{
    static s_tooltip_number := 1
    static s_max_btt := 40
    __New(x := 0, y := 0, w := 10, h := 10, show_time := 999999999) 
    {
        this.timer := ObjBindMethod(this, "Tick")
        this.x := x
        this.y := y
        this.w := w
        this.h := h
        this.show_time := show_time
        this.which := this.base.s_tooltip_number
        if(this.base.s_tooltip_number == this.s_max_btt)
        {
            this.base.s_tooltip_number := 0
        }
        this.base.s_tooltip_number++
        this.Start()
    }
    __Delete()
    {
    }
    Start() 
    {
        timer := this.timer
        SetTimer % timer,% -this.show_time
        MouseTip(this.x, this.y, this.w, this.h, this.which)
    }
    Stop() 
    {
        gui_name := "name_" this.which
        timer := this.timer
        SetTimer % timer, delete
        Gui, %gui_name%: Destroy
        this.timer := 0
    }
    Tick() 
    {
        this.stop()
    }
}
;by feiyue
MouseTip(x="", y="", w="", h="", which := 1)
{
  local
  if (x="")
  {
    VarSetCapacity(pt,16,0), DllCall("GetCursorPos","ptr",&pt)
    x:=NumGet(pt,0,"uint"), y:=NumGet(pt,4,"uint")
  }
  x:=Round(x)
  y:=Round(y)
  h:=Round(h)
  w:=Round(w)
  gui_name := "name_" which
  ;-------------------------
  Gui, %gui_name%: +AlwaysOnTop -Caption +ToolWindow +Hwndmyid +E0x08000000
  Gui, %gui_name%: Show, Hide w%w% h%h%
  ;-------------------------
  dhw:=A_DetectHiddenWindows
  DetectHiddenWindows, On
  d:=4, i:=w-d, j:=h-d
  s=0-0 %w%-0 %w%-%h% 0-%h% 0-0
  s=%s%  %d%-%d% %i%-%d% %i%-%j% %d%-%j% %d%-%d%
  WinSet, Region, %s%, ahk_id %myid%
  DetectHiddenWindows, %dhw%
  ;-------------------------
  Gui, %gui_name%: Show, NA x%x% y%y%
  Gui, %gui_name%: Color,%  "Red"
}

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

多线程找色(3线程)

2021-12-2 15:43:28

其他

分辨率修改和副显示器状态监测

2021-12-2 15:43:41

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索