Last active
July 9, 2018 13:44
-
-
Save chisui/0ebfed785554c200b957a72d84303569 to your computer and use it in GitHub Desktop.
Hipchat autohotkey loading bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force | |
^+l:: | |
SetKeyDelay ,-1 | |
Send /me is thinking 00`% [░░░░░░░░░░] | |
Sleep 2 | |
Send {Enter} | |
sleep, 250 | |
Loop, 100 { | |
Tail := % 11 - (A_Index / 10) | |
Head := % Ceil(A_Index / 10) - 1 | |
NextTail := % 11 - ((A_Index + 1) / 10) | |
NextHead := % Ceil((A_Index + 1) / 10) - 1 | |
Percent := % A_Index - 1 | |
NextPercent := % Percent + 1 | |
if (Percent < 10) { | |
Percent := % "0" . Percent | |
} | |
if (NextPercent < 10) { | |
NextPercent := % "0" . NextPercent | |
} | |
Send ,s/ %Percent%`% [ | |
Loop, %Head% { | |
Send █ | |
} | |
Loop, %Tail% { | |
Send ░ | |
} | |
Send ]/ %NextPercent%`% [ | |
Loop, %NextHead% { | |
Send █ | |
} | |
Loop, %NextTail% { | |
Send ░ | |
} | |
Send ]/ | |
Sleep 2 | |
Send {Enter} | |
sleep, 250 | |
} | |
Send ,s/thinking 100`% [██████████]/done thinking: That's a bad idea/{Enter} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment