Code:
#Persistent
Pids := Object()
Process, Exist, TeamViewer.exe
If (ErrorLevel)
Msgbox, "Teamviewer is currenly running. This is a known program to cause issues with the bot. Please close it or disable quick connect feature. If issues still happen try to uninstall it."
Gui, Add, Text,, mpAutoPickup v1.1`n`nKeys :`nNumpad8 to start/pause`nNumpad9 to exit`n`nActive accunts count :
Gui, Add, Text, vCount w200
Gui -Resize -MinimizeBox
Gui, Show,,mpAutoPickup
SetTimer, SendControls, 999
SetTimer, UpdateGui, 250
return
numpad8::
WinGet, APID, PID, A
WinGetTitle, winTitle, ahk_pid %APID%
if (winTitle = "Trove"){
found = 0
for i, p in Pids
if (p=APID)
found=1
if (found!=1){
Pids.Insert(APID)
ToolTip, %APID% Now active
SetTimer, RemoveToolTip, 5000
}else{
newPids := Object()
for i, p in Pids
if (p!=APID)
newPids.Insert(p)
Pids := newPids
ToolTip, %APID% Now inactive
SetTimer, RemoveToolTip, 5000
}
}else{
Msgbox, %winTitle% is not a valid Trove window
}
return
numpad9::
ExitApp
SendControls:
for i, pid in Pids{
ControlSend, , {e down}, ahk_pid %PID%
Random, r, 999, 1800
Sleep, %r%
ControlSend, , {e up}, ahk_pid %PID%
}
return
UpdateGui:
clients := Pids.MaxIndex()
GuiControl,, Count, %clients%
return
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return
GuiClose:
ExitApp