Skip to content

Commit

Permalink
Merge pull request #5 from carlosmachina/master
Browse files Browse the repository at this point in the history
Bugfix: RightClick on Alt+Tab
  • Loading branch information
Beatso authored Dec 23, 2020
2 parents 923c0b3 + 1f79eb6 commit 3af40fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
Binary file added releases/simpleautoclicker_beatso_v2.2.7.exe
Binary file not shown.
24 changes: 15 additions & 9 deletions simpleautoclicker_beatso.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SetWorkingDir %A_ScriptDir%
Global optObj := Object("Spam Click", 100, "Any Sword", 625, "Wooden or Stone Axe", 1250, "Iron Axe", 1110, "Gold, Diamond or Netherite Axe", 1000)
Global optListStr := "|"
Global timer := 1000
Global appTitle := "Simple Auto Clicker v2.2.6"
Global appTitle := "Simple Auto Clicker v2.2.7"

Global isClicking := False
Global guiInitialized := False
Expand Down Expand Up @@ -73,6 +73,10 @@ MsgBox, , Simple Auto Clicker, Go to Minecraft window and press Ctrl+J to start.

if (mcStatus = "ok")
{
if(isClicking)
{
Gosub, ^+j
}
Gui Show, w425 h160, %appTitle%
}
return
Expand All @@ -95,8 +99,7 @@ ButtonOK:
displayTimer := ValueDisplayFormat(timer)

MsgBox, , Simple Auto Clicker, Cooldown set to %displayTimer%. Press Ctrl+Shift+J in Minecraft to start.`nPress Ctrl+J at any time to change settings. Use Ctrl+Shift+J to pause, and Ctrl+Alt+J to quit.

Menu, Tray, UseErrorLevel
Menu, Tray, UseErrorLevel
Menu, Tray, Enable, Start Clicking
Menu, Tray, UseErrorLevel, Off

Expand Down Expand Up @@ -132,10 +135,7 @@ return
isClicking := True
ToggleClickMenu()
TrayTip, %appTitle%, Clicking Activated
If (RightClick=1)
{
ControlClick,, ahk_id %winid%,, Right,, NA D
}

Loop
{
UpdateMcStatus(currentWinId)
Expand All @@ -149,9 +149,15 @@ return
;Check every loop if it should continue, otherwise break the loop
if not isClicking
{
ControlClick,, ahk_id %winid%,, Right,, NA U
break
}

If (RightClick=1)
{
ControlClick,, ahk_id %winid%,, Right,, NA D
}

ControlClick,, ahk_id %winid%,,Left,,NA
Sleep, %timer%
}
Expand Down Expand Up @@ -184,7 +190,7 @@ ValueDisplayFormat(value)
valueMeasurement := "s"
}

return formattedValue valueMeasurement
return formattedValue valueMeasurement
}

ToggleClickMenu()
Expand Down Expand Up @@ -264,7 +270,7 @@ ToggleClicking:
{
if WinExist("ahk_id" winid)
WinActivate

Gosub, ^+j
return
}
Expand Down

0 comments on commit 3af40fa

Please sign in to comment.