zoukankan      html  css  js  c++  java
  • 自动化脚本 AHK

    #C::
    while(1)
    {
        Sleep, 10
        Click
        GetKeyState, state, Shift
        if state = D
            break
    }
    #C::
    MouseGetPos, mousex,mousey,windowhandle,controlhandle,2
    WinGetTitle,title,ahk_id, %windowhandle%
    while(1)
    {
        ControlClick, x%mousex% y%mousey%, ahk_id %windowhandle%
        ToolTip, %title%`n x%mousex% y%mousey%
        GetKetState, state ,Shift
        if state == D
            break
    }
    ; 在鼠标处弹出菜单 Win-Z .
    
    ;   , 菜单名,    ,菜单项文字,回调函数
    Menu, MyMenu, Add, D disk, MenuHandlerD
    Menu, MyMenu, Add, E disk, MenuHandlerE
    Menu, MyMenu, Add                           ; 分割线
    
    ; 创建菜单,将被作为子菜单
    Menu, Submenu1, Add, Item1, MenuHandler
    Menu, Submenu1, Add, Item2, MenuHandler
    
    ; 加入子菜单
    Menu, MyMenu, Add, My Submenu, :Submenu1
    
    Menu, MyMenu, Add                           ; Add a separator line below the submenu.
    Menu, MyMenu, Add, Item3, MenuHandler       ; Add another menu item beneath the submenu.
    return                                      ; End of script's auto-execute section.
    
    ;call back
    MenuHandler:
    MsgBox You selected %A_ThisMenuItem% from the menu %A_ThisMenu%.
    return
    
    MenuHandlerD:
    Run, explore D:\
    return
    
    MenuHandlerE:
    Run, explore E:\
    return
    
    ; hot key
    #z::Menu, MyMenu, Show  ; i.e. press the Win-Z hotkey to show the menu.
  • 相关阅读:
    写在寒假
    Docker安装Redis(两种方式)
    JVM类加载机制
    RabbitMQ学习
    MySQL索引详解
    Java内存区域
    Window10下的Docker Desktop安装(保姆级教程)
    JVM垃圾回收
    力扣Hot100(目前进度89/100)
    C# 发送邮件实例
  • 原文地址:https://www.cnblogs.com/Searchor/p/7410519.html
Copyright © 2011-2022 走看看