The amazing part about my own version of FastLoot is that you can use it out the inventory and in the inventory.
Code:
#NoEnv
SetTitleMatchMode, 2
#ifwinactive, PLAYERUNKNOWN'S BATTLEGROUNDS
activeMonitorInfo(X, Y, Width, Height)
FastLoot = CapsLock
ExitCommand = F9
LootRandomTimeMin = 40
LootRandomTimeMax = 80
WaitAfterTab = 100
WaitBeforeTab = 10
Hotkey, *~%FastLoot%, FastLoot
Hotkey, *~%ExitCommand%, ExitCommand
return
FastLoot:
Suspend, Permit
ConstantY := Height/1080
ConstantX := Width/1920
If FastLoot {
if (isMouseShown() = false) {
SendMode Input
SendInput, {Tab}
Sleep, %WaitAfterTab%
MouseClickDrag, Left, 135 * ConstantX, 165 * ConstantY, Width/2, 130 * ConstantY, 0
Gosub, SleepTime
MouseClickDrag, Left, 135 * ConstantX, 225 * ConstantY, Width/2, 130 * ConstantY, 0
Gosub, SleepTime
MouseClickDrag, Left, 135 * ConstantX, 230 * ConstantY, Width/2, 130 * ConstantY, 0
Gosub, SleepTime
MouseClickDrag, Left, 135 * ConstantX, 290 * ConstantY, Width/2, 130 * ConstantY, 0
Sleep, %WaitBeforeTab%
SendInput, {Tab}
} else {
SendMode Input
MouseClickDrag, Left, 135 * ConstantX, 165 * ConstantY, Width/2, 130 * ConstantY, 0
Gosub, SleepTime
MouseClickDrag, Left, 135 * ConstantX, 225 * ConstantY, Width/2, 130 * ConstantY, 0
Gosub, SleepTime
MouseClickDrag, Left, 135 * ConstantX, 230 * ConstantY, Width/2, 130 * ConstantY, 0
Gosub, SleepTime
MouseClickDrag, Left, 135 * ConstantX, 290 * ConstantY, Width/2, 130 * ConstantY, 0
}
}
SleepTime:
Random, LootRandomTime, %LootRandomTimeMin%, %LootRandomTimeMax%
Sleep, %LootRandomTime%
return
isMouseShown()
{
StructSize := A_PtrSize + 16
VarSetCapacity(InfoStruct, StructSize)
NumPut(StructSize, InfoStruct)
DllCall("GetCursorInfo", UInt, &InfoStruct)
Result := NumGet(InfoStruct, 8)
if Result > 1
Return true
else
Return false
}
Loop {
if isMouseShown()
Suspend On
else
Suspend Off
Sleep 1
}
activeMonitorInfo( ByRef X, ByRef Y, ByRef Width, ByRef Height ) {
CoordMode, Mouse, Screen
MouseGetPos, mouseX , mouseY
SysGet, monCount, MonitorCount
Loop %monCount% {
SysGet, curMon, Monitor, %a_index%
if ( mouseX >= curMonLeft and mouseX <= curMonRight and mouseY >= curMonTop and mouseY <= curMonBottom ) {
X := curMonTop
y := curMonLeft
Height := curMonBottom - curMonTop
Width := curMonRight - curMonLeft
return
}
}
}
ExitCommand:
Suspend, Permit
SoundPlay, %A_ScriptDir%\DataDana\exitbeep.wav, wait
ExitApp
return