Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fixes #23

Merged
merged 5 commits into from
Nov 4, 2022
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions AFB.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
; AHK v2
#SingleInstance Force
SetTitleMatchMode 3

/*
constants
Expand Down Expand Up @@ -85,6 +86,7 @@ Reconnect(winWidth, winHeight) {
try {
for (searchImage in RECONNECT_IMG_SEARCH_ARRAY) {
if (ImageSearch(&foundX, &foundY, 0, 0, winWidth, winHeight, searchImage)) {
MouseMove(foundX - 100, FoundY - 100, 0)
ItzNxthaniel marked this conversation as resolved.
Show resolved Hide resolved
ClickImageMidPoint(searchImage, foundX, foundY)
return 1
}
Expand Down Expand Up @@ -126,9 +128,9 @@ ClickImageMidPoint(imageFile, xOffset, yOffset){
clickX := imageMidPoint[1] + xOffset
clickY := imageMidPoint[2] + yOffset

; ! Clicks seems to be flakey, this is why using two Click() instead of the 3rd parameter
Click(clickX, clickY)
Sleep(350)
SendMode("Event")
MouseMove(clickX, clickY, 10)
SendMode("Input")
Click(clickX, clickY)
}

Expand Down