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
- Hotkey, ^2, ToggleOn
- Hotkey, ^3, ToggleOff
- Exit(){
- ExitApp
- }
- global toggle := 0
- global count := 0
- global ticks := 0
- ToggleOn(){
- if(toggle = 0){
- toggle := 1
- Start()
- }
- }
- ToggleOff(){
- if(toggle = 1){
- toggle := 0
- }
- }
- Start(){
- While(toggle = 1){
- Send {Space Down}
- startTime := A_TickCount
- While(A_TickCount - startTime <= 921){
- ticks := A_TickCount - startTime
- }
- Send {Space Up}
- ;count++
- ;Tooltip, %toggle%`n%count%`n%ticks%
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement