SetBatchLines, -1
SendMode, Input
SetWinDelay, -1
SetControlDelay, -1
SetDefaultMouseSpeed 0
SetMouseDelay -1
SetKeyDelay -1
process, priority, ,h
CoordMode, Mouse, Screen
actions=0
timer=0
s=200
chaton=0
IniRead, approximatebwchartapm, setup.ini, parameters, approximatebwchartapm
IniRead, disablewindowskey, setup.ini, parameters, disablewindowskey
IniRead, poll, setup.ini, parameters, poll
IniRead, plustimer, setup.ini, parameters, plustimer
IniRead, showtime, setup.ini, parameters, showtime
IniRead, logapm, setup.ini, parameters, logapm
IniRead, logapminterval, setup.ini, parameters, logapminterval
IniRead, exitshortcut, setup.ini, shortcuts, exitshortcut
IniRead, restarttimer, setup.ini, shortcuts, restarttimer
IniRead, bwchartappxshortcut, setup.ini, shortcuts, bwchartappxshortcut
IniRead, textcolor, setup.ini, gui, textcolor
IniRead, bgcolor, setup.ini, gui, bgcolor
logapminterval:=logapminterval/60
if(logapm=1){
FileAppend, `n`nLogging Started`n`n`n,stats.txt
}
#HotkeyInterval 1000
#MaxHotkeysPerInterval 70
gui, font, c%textcolor%, Arial
Gui, Color ,c%bgcolor%
if (showtime=0){
Gui, Add, Text, W60 h15 vMyText
}
else{
hour=0
min=0
sec=0
hbeef=
mbeef=
sbeef=
Gui, Add, Text, W100 h15 vMyText
}
Gui, Margin, 0,0
#Persistent
SetTimer, updategui, 0
SetTimer, updateapm, %poll%
return
updategui:
Critical
GuiControl, Move, MyText, x0 y0
Gui, +AlwaysOnTop -SysMenu -Caption
MouseGetPos, mX, mY
if(showtime=0){
if((mX <= 60) and (mY <= 15)) {
Gui, Show, W0 H0 NoActivate X0 Y0,APM Detector
}
else{
Gui, Show, AutoSize NoActivate X0 Y0,APM Detector
}
}
else{
if((mX <= 100) and (mY <= 15)) {
Gui, Show, W0 H0 NoActivate X0 Y0,APM Detector
}
else{
Gui, Show, AutoSize NoActivate X0 Y0,APM Detector
}
}
return
updateapm:
timer+=%plustimer%
timer+=0.0002
if (actions < 0){
actions=0
}
apm := Round(actions / timer)
if(logapm=1){
apmcounter+=%plustimer%
if(apmcounter>logapminterval){
FileAppend, %apm%`n,stats.txt
apmcounter=0
}
}
if (showtime=0){
GuiControl,, MyText, APM: %apm%
}
else {
sec:=Round(timer * 60)
loophr:
if (sec > 3599) {
sec-=3600
if(sec < 0){
sec=0
}
hour+=1
Goto loophr
}
loopmn:
if (sec > 59) {
sec-=60
if(sec < 0){
sec=0
}
min+=1
Goto loopmn
}
if(hour < 10){
hbeef=0
}
if(min < 10){
mbeef=0
}
if(sec < 10){
sbeef=0
}
if(apm < 10){
GuiControl,, MyText, APM: %apm% %hbeef%%hour%:%mbeef%%min%:%sbeef%%sec%
}
else{
if(apm < 100){
GuiControl,, MyText, APM: %apm% %hbeef%%hour%:%mbeef%%min%:%sbeef%%sec%
}
else{
GuiControl,, MyText, APM: %apm% %hbeef%%hour%:%mbeef%%min%:%sbeef%%sec%
}
}
min=0
hour=0
hbeef=
mbeef=
sbeef=
}
return
!e::
if(exitshortcut=1){
ExitApp
}
return
!a UP::
if(bwchartappxshortcut=1){
if(approximatebwchartapm=1){
approximatebwchartapm=0
}
else{
approximatebwchartapm=1
}
}
return
!z UP::
if(restarttimer=1){
loopy:
if not GetKeyState("Alt", "P"){
if(logapm=1){
timer*=60
FileAppend, `n`nTimer Reset after %timer% seconds`n`n`n,stats.txt
}
actions=-1
timer=0
Sleep, 10
}
else{
Goto loopy
}
chaton=0
}
return
*~Q UP::
*~W UP::
*~E UP::
*~R UP::
*~T UP::
*~Y UP::
*~U UP::
*~I UP::
*~O UP::
*~P UP::
*~A UP::
*~S UP::
*~D UP::
*~F UP::
*~G UP::
*~H UP::
*~J UP::
*~K UP::
*~L UP::
*~Z UP::
*~X UP::
*~C UP::
*~V UP::
*~B UP::
*~N UP::
*~M UP::
*~1 UP::
*~2 UP::
*~3 UP::
*~4 UP::
*~5 UP::
*~6 UP::
*~7 UP::
*~8 UP::
*~9 UP::
*~0 UP::
if(approximatebwchartapm=1){
if(chaton=0){
actions+=1
}
}
else{
actions+=1
}
return
*~Space UP::
*~Tab UP::
*~Backspace UP::
*~Delete UP::
*~Insert UP::
*~Home UP::
*~End UP::
*~PgUp UP::
*~PgDn UP::
*~Up UP::
*~Down UP::
*~Left UP::
*~Right UP::
*~ScrollLock UP::
*~CapsLock UP::
*~NumLock UP::
*~NumPad7 UP::
*~NumPad8 UP::
*~NumPad9 UP::
*~NumPad4 UP::
*~NumPad5 UP::
*~NumPad6 UP::
*~NumPad1 UP::
*~NumPad2 UP::
*~NumPad3 UP::
*~NumPad0 UP::
*~NumpadDot UP::
*~NumpadIns UP::
*~NumpadEnd UP::
*~NumpadDown UP::
*~NumpadPgDn UP::
*~NumpadLeft UP::
*~NumpadClear UP::
*~NumpadRight UP::
*~NumpadHome UP::
*~NumpadUp UP::
*~NumpadPgUp UP::
*~NumpadDiv UP::
*~NumpadDel UP::
*~NumpadMult UP::
*~NumpadAdd UP::
*~NumpadSub UP::
*~NumpadEnter UP::
*~AppsKey UP::
*~F1 UP::
*~F2 UP::
*~F3 UP::
*~F4 UP::
*~F5 UP::
*~F6 UP::
*~F7 UP::
*~F8 UP::
*~F9 UP::
*~F10 UP::
*~F11 UP::
*~F12 UP::
*~Alt UP::
*~Shift UP::
*~Ctrl UP::
*~MButton::
*~LWin UP::
*~RWin UP::
*~PrintScreen::
*~CtrlBreak::
if(approximatebwchartapm=0){
actions+=1
}
return
*~Enter UP::
if(approximatebwchartapm=0){
actions+=1
}
else{
if(chaton=0){
chaton=1
}
else{
chaton=0
}
}
return
*~Escape UP::
if(approximatebwchartapm=0){
actions+=1
}
else{
if(chaton=1){
chaton=0
}
else{
actions+=1
}
}
return
*~LButton::
*~RButton::
MouseGetPos, mX, mY
if(showtime=0){
if((mX <= 60) and (mY <= 15)) {
Gui, Show, W0 H0 NoActivate X0 Y0,APM Detector
}
else{
Gui, Show, AutoSize NoActivate X0 Y0,APM Detector
}
}
else{
if((mX <= 100) and (mY <= 15)) {
Gui, Show, W0 H0 NoActivate X0 Y0,APM Detector
}
else{
Gui, Show, AutoSize NoActivate X0 Y0,APM Detector
}
}
actions+=1
return
GuiClose:
ExitApp