diff --git a/.gitignore b/.gitignore index de99169..2390fdb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ TheDivision2.ini +*.ini diff --git "a/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.ahk" "b/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.ahk" new file mode 100644 index 0000000..d470e43 --- /dev/null +++ "b/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.ahk" @@ -0,0 +1,230 @@ +#NoEnv +#InstallKeybdHook +#InstallMouseHook +#KeyHistory 50 +#UseHook +#MaxThreadsPerHotkey 1 +#MaxThreads 30 +#MaxThreadsBuffer off +SendMode Input +ListLines, Off + +SetWorkingDir %A_ScriptDir% + +PID := DllCall("GetCurrentProcessId") +Process, Priority, %PID%, High + +global voiceObject := ComObjCreate("SAPI.SpVoice") +;voiceObject.Rate := 4 +voiceObject.Volume := 100 +global delay :=100 + +if FileExist("ZLsettings.ini") +{ + IniRead , vOneKeyZL, ZLsettings.ini, 一键政令, 启用, 1 + IniRead, delay, ZLsettings.ini, 一键政令, 延迟, 150 + IniRead , vResetArea, ZLsettings.ini, 一键政令, 重置控制点, 1 + IniRead , vSwitchLevel, ZLsettings.ini, 一键政令, 切换难度, 1 + +} +Else +{ + iniWrite , 1, ZLsettings.ini, 一键政令, 启用 + iniWrite, 150, ZLsettings.ini, 一键政令, 延迟 + iniWrite , 1, ZLsettings.ini, 一键政令, 重置控制点 + iniWrite , 1, ZLsettings.ini, 一键政令, 切换难 +} +;##################### +;#====菜单相关====# +;##################### +Menu , tray, NoStandard + +Menu , tray, add, +Menu , tray, add, 一键政令|ALT+1, OnekeyZL +if (vOneKeyZL) { + Menu , tray, check, 一键政令|ALT+1 +} + +Menu , tray, add, 一键政令时重置控制点, ResetArea +if (vResetArea) { + Menu , tray, check, 一键政令时重置控制点 +} + +Menu , tray, add, 一键政令时切换难度, SwitchLevel +if (vSwitchLevel) { + Menu , tray, check, 一键政令时切换难度 +} + +;=========================================== +Menu,Tray,Add, +;常规控制 Menu, tray, add, Menu, tray, NoStandard +Menu,tray,add,重置 | Reload,ReloadScript +Menu,tray,add,暂停 | Pause,PauseScript +Menu,tray,add, +Menu,tray,add,更新 | Ver %ver%,Version ;使用资源表示符 207 表示的图标 +Menu,tray,add,退出 | Exit,ExitScript + +#IfWinActive ahk_exe TheDivision2.exe + + ; 打开或关闭 5 政令,默认是 Alt+1 + !1:: ;英雄难度,5政令,重置控制点 + SendKey("m") + Sleep delay + SendKey("z") + Sleep delay + + if (vSwitchLevel) + { + + SendKey("Space") ;开启英雄难度 + Sleep delay + Loop, 3 + { + SendKey("Down") + Sleep delay + } + SendKey("Space") ;英雄难度 + Sleep delay + SendKey("Esc") + Sleep delay + } + + SendKey("Down") + Sleep delay + SendKey("Space") + Sleep delay + + Loop, 4 ;开政令 + { + SendKey("Space") + Sleep delay + SendKey("Down") + Sleep delay + } + + SendKey("Space") + Sleep delay + SendKey("Esc") + Sleep delay + + if (vResetArea = 1) + { + SendKey("Down") + Sleep delay + SendKey("Space") + Sleep delay + } + + SendKey("f") + Sleep 300 + SendKey("Space",200) + Sleep delay + SendKey("m") + return + + !2:: ;一般难度,5政令关闭 + SendKey("m") + Sleep delay + SendKey("z") + Sleep delay + if (vSwitchLevel){ + ;开启一般难度 + SendKey("Space") + Sleep delay + SendKey("Space") + Sleep delay + } + SendKey("Esc") + Sleep delay + SendKey("Down") + Sleep delay + SendKey("Space") + Sleep delay + + ;关闭政令 + Loop, 4 + { + SendKey("Space") + Sleep delay + SendKey("Down") + Sleep delay + } + + SendKey("Space") + Sleep delay + SendKey("Esc") + Sleep delay + + if (vResetArea = 1) + { + SendKey("Down") + Sleep delay + SendKey("Space") + Sleep delay + } + + SendKey("f") + Sleep 300 + SendKey("Space",200) + Sleep delay + SendKey("m") + return + #IF + + SendKey(Key, vDelay := 80) + { + Send {%key% Down} + Sleep vDelay + Send {%key% Up} + } + + ;##################### + ;#====一键政令相关菜单====# + ;##################### + ;一键政令 + OnekeyZL: + Menu, Tray, ToggleCheck, 一键政令|ALT+1 + vOneKeyZL := Not vOneKeyZL + IniWrite, % vOneKeyZL, ZLsettings.ini, 一键政令, 启用 + return + + ;重置控制点 + ResetArea: + Menu, Tray, ToggleCheck, 一键政令时重置控制点 + vResetArea := Not vResetArea + IniWrite, % vResetArea, ZLsettings.ini, 一键政令, 重置控制点 + return + + ;切换难度 + SwitchLevel: + Menu, Tray, ToggleCheck, 一键政令时切换难度 + vSwitchLevel := Not vSwitchLevel + IniWrite, % vSwitchLevel, ZLsettings.ini, 一键政令, 切换难度 + return + + ;##################### + ;#====常规标签====# + ;##################### + MenuHandler: + return + + ReloadScript: + Reload + return + + PauseScript: + Suspend, Toggle + Pause, Toggle + return + + Help: + run,https://coralfox.notion.site/2-4e842f64f12f4e34bf827f29c30a6942 + return + + Version: + ;ShowToolTip("1.5") + return + + ExitScript: + ExitApp + return \ No newline at end of file diff --git "a/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.exe" "b/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.exe" new file mode 100644 index 0000000..8b1c078 Binary files /dev/null and "b/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.exe" differ diff --git "a/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.rar" "b/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.rar" new file mode 100644 index 0000000..218aa85 Binary files /dev/null and "b/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210/\344\270\200\351\224\256\346\224\277\344\273\244\347\213\254\347\253\213\347\211\210.rar" differ diff --git "a/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.ahk" "b/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.ahk" index 6c29450..d2673b2 100644 --- "a/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.ahk" +++ "b/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.ahk" @@ -10,14 +10,13 @@ #MaxThreads 30 #MaxThreadsBuffer off ; #Include BTT.ahk -; SendMode InputThenPlay +SendMode InputThenPlay ListLines , Off CurPID := DllCall("GetCurrentProcessId") Process , Priority, %CurPID%, High CoordMode , Pixel, Screen CoordMode , Mouse, Screen SetWorkingDir %A_ScriptDir% - ;##################### ;#====读取ini&初始化====# ;##################### @@ -56,7 +55,7 @@ IniRead , vSetUPC, TheDivision2.ini, 游戏启动, 降低UPC, 1 IniRead , vSetEN, TheDivision2.ini, 游戏启动, 英文模式, 1 IniRead , vOneKeyZL, TheDivision2.ini, 一键政令, 启用, 1 -IniRead , resetArea, TheDivision2.ini, 一键政令, 重置控制点, 1 +IniRead , vResetArea, TheDivision2.ini, 一键政令, 重置控制点, 1 IniRead , vAutoBox, TheDivision2.ini, 服装箱子, 启用, 0 @@ -154,8 +153,8 @@ if (vOneKeyZL) { Menu , tray, check, 一键政令|ALT+1 } -Menu , tray, add, 一键政令时重置控制点, ResetControlArea -if (resetArea) { +Menu , tray, add, 一键政令时重置控制点, ResetArea +if (vResetArea) { Menu , tray, check, 一键政令时重置控制点 } @@ -371,41 +370,41 @@ return cmdInfo ; 打开或关闭 5 政令,默认是 Alt+1 #If (WinActive("ahk_exe TheDivision2.exe") or debug) AND vOneKeyZL !1:: -vDelay:=150 -SendPlay {m} -Sleep %vDelay% -SendPlay {z} -Sleep %vDelay% -SendPlay {Down} -Sleep %vDelay% -SendPlay {Space} -Sleep %vDelay% +vDelay:=80 +SendKey("m") +Sleep vDelay +SendKey("z") +Sleep vDelay +SendKey("Down") +Sleep vDelay +SendKey("Space") +Sleep vDelay loop, 4 { - SendPlay {Space} - Sleep %vDelay% - SendPlay {Down} - Sleep %vDelay% + SendKey("Space") + Sleep vDelay + SendKey("Down") + Sleep vDelay } -SendPlay {Space} -Sleep %vDelay% -SendPlay {Esc} -Sleep %vDelay% +SendKey("Space") +Sleep vDelay +SendKey("Esc") +Sleep vDelay ;根据选项决定是否重置控制点 -if (resetArea = 1) +if (vResetArea = 1) { - SendPlay {Down} - Sleep %vDelay% - SendPlay {Space} - Sleep %vDelay% + SendKey("Down") + Sleep vDelay + SendKey("Space") + Sleep vDelay } -SendPlay {f} +SendKey("f") +Sleep 300 +SendKey("Space",200) Sleep 300 -SendPlay {Space} -Sleep %vDelay% -SendPlay {m} +SendKey("m") return ; 启动自动打开服装箱,默认是 Alt+2 @@ -717,7 +716,7 @@ readWeapon(_chooseGun) IniWrite , % _weaponTextFix, TheDivision2.ini, 高级模式, 武器名修饰后缀 } - Speak(_weaponText . _weaponTextFix) + ; Speak(_weaponText . _weaponTextFix) } ~NumpadAdd:: ; Adds compensation. @@ -969,10 +968,10 @@ OnekeyZL: return ;重置控制点 -ResetControlArea: +ResetArea: Menu, Tray, ToggleCheck, 一键政令时重置控制点 - resetArea := Not resetArea - IniWrite, % resetArea, TheDivision2.ini, 一键政令, 重置控制点 + vResetArea := Not vResetArea + IniWrite, % vResetArea, TheDivision2.ini, 一键政令, 重置控制点 return ;自动开服装箱 @@ -1155,13 +1154,13 @@ RemoveToolTip: return } -SendKey(Key,delay := 30) +SendKey(Key,DelayTime := 30) { - Random, fixDelay, 20, 60 + Random, fixDelay, 20, 50 - delay +=fixdelay + DelayTime +=fixdelay Send {%key% Down} - Sleep Delay + Sleep DelayTime Send {%key% Up} } diff --git "a/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.exe" "b/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.exe" index a051a01..9290a7c 100644 Binary files "a/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.exe" and "b/\345\205\250\345\242\203\345\260\201\351\224\2012-\346\214\211\351\224\256\345\212\251\346\211\213.exe" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH11" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH11" new file mode 100644 index 0000000..76b4f18 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH11" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH12" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH12" new file mode 100644 index 0000000..9104377 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH12" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH13" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH13" new file mode 100644 index 0000000..070ca70 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH13" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH14" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH14" new file mode 100644 index 0000000..8277a5b Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH14" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH21" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH21" new file mode 100644 index 0000000..b5ce043 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH21" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH22" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH22" new file mode 100644 index 0000000..0eb8613 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH22" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH23" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH23" new file mode 100644 index 0000000..f40fa44 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH23" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH24" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH24" new file mode 100644 index 0000000..171d56b Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH24" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH31" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH31" new file mode 100644 index 0000000..e4f6bc8 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH31" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH32" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH32" new file mode 100644 index 0000000..e7cc3d6 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH32" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH33" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH33" new file mode 100644 index 0000000..71c95c2 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH33" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH34" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH34" new file mode 100644 index 0000000..086b152 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH34" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH41" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH41" new file mode 100644 index 0000000..4df43e3 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH41" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH42" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH42" new file mode 100644 index 0000000..1c011f5 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH42" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH43" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH43" new file mode 100644 index 0000000..47694b6 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH43" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH44" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH44" new file mode 100644 index 0000000..c17043d Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH44" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH51" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH51" new file mode 100644 index 0000000..771c296 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH51" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH52" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH52" new file mode 100644 index 0000000..fb170f5 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH52" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH53" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH53" new file mode 100644 index 0000000..a57ae98 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH53" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH54" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH54" new file mode 100644 index 0000000..c9f9932 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH54" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH61" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH61" new file mode 100644 index 0000000..6bdd9f1 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH61" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH62" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH62" new file mode 100644 index 0000000..29193b8 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH62" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH63" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH63" new file mode 100644 index 0000000..671e3ab Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH63" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH64" "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH64" new file mode 100644 index 0000000..5593113 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/IMG/CH64" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.ahk" "b/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.ahk" new file mode 100644 index 0000000..bf2ab01 --- /dev/null +++ "b/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.ahk" @@ -0,0 +1,328 @@ +; +; AutoHotkey Version: 1.x +; Language: English +; Platform: Windows 7/8/8.1 32/64bit +; Author: Youcef Hamdani +; YOUCEFHam +; Script Function: +; +; +{ + #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. + #Persistent + SendMode Input ; Recommended for new scripts due to its superior speed and reliability. + SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. + CoordMode, ToolTip, Screen + + ;-------------Remove .ahk and .exe from filename to get name for INI file + ScriptName := A_ScriptName + StringReplace, ScriptName, ScriptName, .ahk,, All + StringReplace, ScriptName, ScriptName, .exe,, All +} + +;---------------------------------------YOUCEFHam-----------------------------No Recoil/Rapid Fire +vm = 1 +ft = 1 +chv = 0 + +;--------------------Load the saved values. +IfExist %ScriptName%.ini +{ + IniRead,chxt, %ScriptName%.ini, Crochair tol,chxt + IniRead,chyt, %ScriptName%.ini, Crochair tol,chyt + IniRead,chp, %ScriptName%.ini, Crochair Picture, PictureNum + IniRead,chcl, %ScriptName%.ini, Crochair Picture, Picturecolor + IniRead,chc, %ScriptName%.ini, Crochair Picture, Picturecolorval + IniRead,chimg, %ScriptName%.ini, Crochair Picture, PictureFile + IniRead,chimgw, %ScriptName%.ini, Crochair Picture, PictureWidth + IniRead,chimgh, %ScriptName%.ini, Crochair Picture, PictureHeight +} +;------------------------------------------ + +;--------------------Set the new values. +IfnotExist %ScriptName%.ini +{ + chxt = 0 + chyt = 0 + IniWrite, %chxt%, %ScriptName%.ini , Crochair tol, chxt + IniWrite, %chyt%, %ScriptName%.ini , Crochair tol, chyt + chp = 1 + chc = 1 + chcl = 蓝色 + IniWrite, %chp%, %ScriptName%.ini , Crochair Picture, PictureNum + IniWrite, %chcl%, %ScriptName%.ini , Crochair Picture, Picturecolor + IniWrite, %chc%, %ScriptName%.ini , Crochair Picture, Picturecolorval + chimg = CH%chp%%chc% + chimgw = 60 + chimgh = 60 + IniWrite, %chimg%, %ScriptName%.ini , Crochair Picture, PictureFile + IniWrite, %chimgw%, %ScriptName%.ini , Crochair Picture, PictureWidth + IniWrite, %chimgh%, %ScriptName%.ini , Crochair Picture, PictureHeight +} +;------------------------------------------ + +SetTimer, menu, 120 +goto menu + +PGDN:: + { + if vm = 1 + { + vm = 0 + SetTimer, menu, Off + ToolTip,,,,1 + } + else if vm = 0 + { + vm = 1 + SetTimer, menu, 120 + goto menu + } + } +return + +menu: + { + ToolTip,准星类型: %chp%`n准星颜色: %chcl%`n准星类型: %chimgw%`n---------------------------------------------`nKey Effect`nPageDown 显示/隐藏菜单`nHome 显示/隐藏准星`n/ 改变准星类型`n* 改变准星颜色`n+ 准星加大`n- 准星减小`nCtrl+方向键 移动准星`nEnd 重载`nPause 暂停`nDelete 退出`n---------------------------------------------`nCreated By YoucefHam,0,0,1 + } +return + +Home:: ;------------Show/Hide Crochair + { + if chv = 0 + { + if ft = 1 + gosub, showch + else if ft =0 + gosub, drawch + chv = 1 + SetTimer, tick, 200 + } + else if chv = 1 + { + Gui, Cancel + SetTimer, tick, Off + chv = 0 + } + } +return +showch: + { + if ft = 1 + { + WinGetActiveTitle, wint + WinGetPos, winx, winy, winw, winh, %wint% + gosub, posch + Gui Add, Picture, w%chimgw% h%chimgh% AltSubmit, %A_ScriptDir%\IMG\%chimg% + Gui Color, FFFFFF + Gui Show, NA x%chx% y%chy% + Gui +AlwaysOnTop + WinSet, TransColor, White, %A_ScriptName% + Gui -Caption + ft = 0 + } + } +return + +posch: + { + chx := winx + (winw /2) + chxt - chimgw + chy := winy + (winh /2) + chyt - chimgh + } +return + +drawch: + { + GoSub, posch + Gui, Show, NA x%chx% y%chy% + } +return + +tick: + { + IfWinActive, %wint% + { + WinGetPos, winx1, winy1, winw1, winh1, %wint% + if winx1 <> winx or winy1 <> winy or winw1 <> winw or winh1 <> winh + { + WinGetPos, winx, winy, winw, winh, %wint% + if chv = 1 + GoSub, drawch + } + } + else + { + Gui, Cancel + } + } +return + +;-------------------------------Move/Adjust Crochair +{ +^Up:: + { + chyt -= 1 + GoSub, drawch + IniWrite, %chyt%, %ScriptName%.ini, Crochair tol, chyt + } +return + +^Down:: + { + chyt += 1 + GoSub, drawch + IniWrite, %chyt%, %ScriptName%.ini, Crochair tol, chyt + } +return + +^Left:: + { + chxt -= 1 + GoSub, drawch + IniWrite, %chxt%, %ScriptName%.ini, Crochair tol, chxt + } +return + +^Right:: + { + chxt += 1 + GoSub, drawch + IniWrite, %chxt%, %ScriptName%.ini, Crochair tol, chxt + } +return +} +;-------------------------------------------------- + +NumpadDiv:: + { + if chv = 1 + { + if chp = 1 + { + chp = 2 + chimg = CH%chp%%chc% + } + else if chp = 2 + { + chp = 3 + chimg = CH%chp%%chc% + } + else if chp = 3 + { + chp = 4 + chimg = CH%chp%%chc% + } + else if chp = 4 + { + chp = 5 + chimg = CH%chp%%chc% + } + else if chp = 5 + { + chp = 6 + chimg = CH%chp%%chc% + } + else if chp = 6 + { + chp = 1 + chimg = CH%chp%%chc% + } + IniWrite, %chimg%, %ScriptName%.ini , Crochair Picture, PictureFile + IniWrite, %chp%, %ScriptName%.ini , Crochair Picture, PictureNum + Gui, Destroy + ft = 1 + gosub, showch + } + } +return + +NumpadMult:: + { + if chv = 1 + { + if chc = 1 + { + chc = 2 + chcl = 绿色 + chimg = CH%chp%%chc% + } + else if chc = 2 + { + chc = 3 + chcl = 红色 + chimg = CH%chp%%chc% + } + else if chc = 3 + { + chc = 4 + chcl = 黄色 + chimg = CH%chp%%chc% + } + else if chc = 4 + { + chc = 1 + chcl = 蓝色 + chimg = CH%chp%%chc% + } + IniWrite, %chimg%, %ScriptName%.ini , Crochair Picture, PictureFile + IniWrite, %chcl%, %ScriptName%.ini , Crochair Picture, Picturecolor + IniWrite, %chc%, %ScriptName%.ini , Crochair Picture, Picturecolorval + Gui, Destroy + ft = 1 + gosub, showch + } + } +return + +NumpadSub:: + { + if chv = 1 + { + chimgw -= 1 + if chimgw < 5 + chimgw = 5 + chimgh -= 1 + if chimgh < 5 + chimgh = 5 + IniWrite, %chimgw%, %ScriptName%.ini , Crochair Picture, PictureWidth + IniWrite, %chimgh%, %ScriptName%.ini , Crochair Picture, PictureHeight + Gui, Destroy + ft = 1 + gosub, showch + } + } +return + +NumpadAdd:: + { + if chv = 1 + { + chimgw += 1 + if chimgw > 200 + chimgw = 200 + chimgh += 1 + if chimgh > 200 + chimgh = 200 + IniWrite, %chimgw%, %ScriptName%.ini , Crochair Picture, PictureWidth + IniWrite, %chimgh%, %ScriptName%.ini , Crochair Picture, PictureHeight + Gui, Destroy + ft = 1 + gosub, showch + } + } +return + +End:: ;-------------Reload the script + { + Gui, Destroy + Reload + } +return ;------------------------------- + +Delete:: ;-------------Exit the script. + { + Gui, Destroy + Sleep, 200 + ExitApp + } +return ;------------------------------- \ No newline at end of file diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.exe" "b/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.exe" new file mode 100644 index 0000000..6ec0b71 Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.exe" differ diff --git "a/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.rar" "b/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.rar" new file mode 100644 index 0000000..c4b7c6a Binary files /dev/null and "b/\345\207\206\346\230\237\345\212\251\346\211\213/\345\207\206\346\230\237\345\212\251\346\211\213.rar" differ