Created
June 15, 2021 14:07
-
-
Save waggz81/bb2aa12c7ab6c1bfebce3fd956eb4fef to your computer and use it in GitHub Desktop.
AHK Script to add all items in Phasmophobia
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
;only activate when phasmo is active window | |
#ifWinActive ahk_exe Phasmophobia.exe | |
F9:: | |
;script options for delays | |
SetBatchLines -1 | |
SetMouseDelay, 1 | |
SetDefaultMouseSpeed, 0 | |
;makes mouse coordinates to be relative to client. | |
CoordMode, Mouse, Client | |
;get the dimensions and fullscreen status | |
WinGetPos, xx, yy, W, H, ahk_exe Phasmophobia.exe | |
WinGet, vWinStyle, Style, ahk_exe Phasmophobia.exe | |
SysGet, CaptionHeight, 4 | |
If !(vWinStyle & 0xC00000) ; if the window doesn't have a title bar | |
{ | |
;No Caption | |
TitleBar := 0 | |
} | |
else { | |
;Caption | |
TitleBar := CaptionHeight | |
H := H - CaptionHeight ;adjust height to compensate for title bar | |
} | |
;list of rows of equipment in array | |
YCoords := Array(.325, .35, .38, .41, .435, .465, .49, .515, .545, .57, .595, .625, .65, .675, .70) | |
;loop through rows | |
for index, YCoords in Ycoords | |
{ | |
;first column position | |
CoordX := W * .47 | |
CoordY := (H * YCoords) | |
Click, %CoordX% %CoordY% | |
;second column is rows 1-7, so only move to this column for those rows | |
if (index < 8) { | |
;second column position | |
CoordX := W * .74 | |
Click, %CoordX% %CoordY% | |
} | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment