Skip to content

Instantly share code, notes, and snippets.

@PaleNeutron
Created March 26, 2015 09:49
Show Gist options
  • Save PaleNeutron/8a200e2dd98beeb65677 to your computer and use it in GitHub Desktop.
Save PaleNeutron/8a200e2dd98beeb65677 to your computer and use it in GitHub Desktop.
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
WinTitle = something
index = 0
gcd := 2500
dot_key_1 = 1
dot_key_2 = 2
dot_key_3 = 3
dot_lengh_1 := 18000 - gcd
dot_lengh_2 = 24000
dot_lengh_3 = 30000
dot_1 = 0
dot_2 = 0
dot_3 = 0
add_dot(dot_key ,ByRef dot, dot_lengh){
global gcd ; , WinTitle
durition := A_TickCount - dot
threshold := dot_lengh - gcd
If ( durition > threshold){
; TrayTip, [ key is %dot_key%, durition is %durition% `n threshold is %threshold%]
; ControlSend, , %dot_key%, %WinTitle%
Send, %dot_key%
Sleep, %gcd%
dot := A_TickCount
}
Return
}
#Esc:: Pause
#1::
Loop{
add_dot(dot_key_1 ,dot_1, dot_lengh_1)
add_dot(dot_key_2 ,dot_2, dot_lengh_2)
add_dot(dot_key_3 ,dot_3, dot_lengh_3)
Sleep, 1000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment