Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #SingleInstance Force
- ;#NoTrayIcon
- SetBatchLines, -1
- SetKeyDelay, -1, 1
- SetControlDelay, -1
- SetMouseDelay, -1
- SetWinDelay, -1
- SetBatchLines, -1
- ListLines, Off
- PID := DllCall("GetCurrentProcessId")
- Process, Priority, %PID%, High
- Hotkey, ^1, Exit
- Exit(){
- Send {w Up}
- Send {d Up}
- MouseClick, Left,,,,,U
- ;Send {LShift Up}
- ExitApp
- }
- global toggleActive := false
- SetTimer, KeyListener, 100
- KeyListener(){
- GetKeyState, keyOne, M
- if(keyOne = "D" and toggleActive = false){
- While(keyOne = "D"){
- GetKeyState, keyOne, M
- }
- toggleActive := true
- Send {w Down}
- Send {d Down}
- MouseClick, Left,,,,,D
- ;Send {LShift Down}
- ;Tooltip, Active
- }
- if(keyOne = "D" and toggleActive = true){
- While(keyOne = "D"){
- GetKeyState, keyOne, M
- }
- toggleActive := false
- Send {w Up}
- Send {d Up}
- MouseClick, Left,,,,,U
- ;Send {LShift Up}
- ;Tooltip, Not Active
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement