zoukankan      html  css  js  c++  java
  • AutoHotKey脚本模板:初始化、配置、退出

    AutoHotKey脚本模板实现初始化、配置、退出

    #NoEnv
    SetWorkingDir %A_ScriptDir%
    CoordMode, Mouse, Screen
    SendMode Input
    #SingleInstance Force
    SetTitleMatchMode 2
    #WinActivateForce
    SetControlDelay 1
    SetWinDelay 0
    SetKeyDelay -1
    SetMouseDelay -1
    SetBatchLines -1
    ; WinSet, Transparent, Off
    
    #NoEnv
    #Warn
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    
    toggle_get_blood := 0
    get_blood_count := 0
    is_show_gui := 0
    is_create_gui :=0
    NewHotKey := "^F9"
    
    MsgBox , 64, 使用提示, 系统要求:xxxxxxxxxxxx, 30
    
    ;;先配置默认快捷键
    Hotkey, ^F1, Change_HotKey_Show
    Hotkey, ^F2, Exit_App
    Hotkey, ^F9, Run_arkAutoGetBlood
    Return
    
    ;;;
    Change_HotKey_Show:
    if is_create_gui = 0
    {
        is_create_gui = 1
        Gui, Add, Text,   x8 y8 w100 h24 +0x200, 自动抽血快捷键:
        Gui, Add, Hotkey, x128 y8 w268 h24 vNewHotKey, %NewHotKey%
        Gui, Add, Button, x40 y56 w80 h25 default gChange_HotKey, 确认(&O) 
        Gui, Add, Button, x288 y56 w80 h25 gCloseForm, 取消(&C)
        Gui, Show, w412 h97, 配置快捷键
    } else
    {
         if is_show_gui = 0
        {
            is_show_gui = 1
            Gui, Show, w412 h97, 配置快捷键
        } else {
            MsgBox , 64, 提示, 重复按键, 1
        }
    }
    Return
    
    Change_HotKey:
    Gui Submit
    display_hot_key = %NewHotKey%
    StringReplace, display_hot_key,  display_hot_key, +,Shift + , All
    StringReplace, display_hot_key,  display_hot_key, ^,Ctrl + , All
    StringReplace, display_hot_key,  display_hot_key, !,Alt + , All
    MsgBox , 64, 提示, 新快捷键: %display_hot_key%, 3
    Hotkey, %NewHotKey%, Run_arkAutoGetBlood
    Return
    
    CloseForm:
    Gui, Hide
    is_show_gui = 1
    Return
    
    ;;;

    脚本下补充自己的主体功能实现体:

    Run_arkAutoGetBlood
    即可
  • 相关阅读:
    azure备份虚拟机
    本地git部署web连接azure的git存储库
    dnsmasq服务的安装与配置
    hadoop错误- slave节点无法启动data node数据节点进程,但是master节点datanode正常启动
    hadoop错误--转发-hadoop启动遇到的各种问题
    hadoop错误--集群启动master时namenode进程无法启动
    c++的字节对齐
    fstream 和 iostream
    C语言的声明的优先级规则
    齐次矩阵
  • 原文地址:https://www.cnblogs.com/eaglexmw/p/12624962.html
Copyright © 2011-2022 走看看