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.
  • 相关阅读:
    寒假作业3:简化电梯优化
    线段树2
    线段树1
    数字游戏(二)
    P1352 没有上司的舞会
    加分二叉树
    数字转换
    BLO-Blockade
    树上倍增法求LCA
    种西瓜
  • 原文地址:https://www.cnblogs.com/Searchor/p/7410519.html
Copyright © 2011-2022 走看看