Skip to content

Instantly share code, notes, and snippets.

@fanthos
Created June 27, 2017 10:38
Show Gist options
  • Select an option

  • Save fanthos/2db2ea4260459dd96b76d974ff672598 to your computer and use it in GitHub Desktop.

Select an option

Save fanthos/2db2ea4260459dd96b76d974ff672598 to your computer and use it in GitHub Desktop.
Plants vs Zombie keyboard shortcut
#IfWinActive, Plants vs. Zombies
CoordMode, Mouse, Client
SetMouseDelay, 0
SetDefaultMouseSpeed, 0
ClickAndRet(x) {
MouseGetPos, xold, yold
MouseMove, x*60+60, 40
MouseClick
MouseMove, xold, yold
MouseClick
}
1::ClickAndRet(1)
2::ClickAndRet(2)
3::ClickAndRet(3)
4::ClickAndRet(4)
5::ClickAndRet(5)
6::ClickAndRet(6)
7::ClickAndRet(7)
@fanthos
Copy link
Author

fanthos commented Jul 29, 2025

@Goldentaco11797
You are right.
The numbers are calculated by actual mouse position for left most and right most buttons and calculated by hand.

I got my numbers by only a few of calculate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment