• 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
    即可
  • 相关阅读:
    巡风安装配置 -windows
    Struts2-052 RCE CVE-2017-9805
    CVE-2017-12615和CVE-2017-12616
    Nmap使用指南
    理解HTTP协议
    缓慢拒绝服务攻击- slowloris.pl
    SSL&TLS渗透测试
    Nmap版本检测
    Protocol Buffer学习教程之编译器与类文件(三)
    64位Windows系统下32位应用程序连接MySql
  • 原文地址:https://www.cnblogs.com/eaglexmw/p/12624962.html
Copyright © 2020-2023  润新知