; Autohotkey ; alt-shift-b for plant plots of barley !+b:: IfWinExist eGenesis Client { WinActivate ;SendMode Input SetDefaultMouseSpeed, 100 ;CoordMode, Mouse, Relative CoordMode, Mouse, Screen WinGetPos,,, winWidth, winHeight CoordMode, Mouse, Relative verticalDrift = 16 horizontalDrift = -10 winXCenter := winWidth / 2 + horizontalDrift winYCenter := winHeight / 2 + verticalDrift MoveDelay = 1000 Spacing = 240 winXLeft := winXCenter - Spacing winXRight := winXCenter + Spacing winYUp := winYCenter - Spacing ; Place you Flax plant menu under here. PlantMenuX = 30 ; 60 hits the unpin button PlantMenuY = 40 Xfields = 4 Yfields = 1 ; a single double row ;Xfields = 0 ;Yfields = 0 ; Cartographic and zoom right in... Sendinput {F8}{F8} loop, 50 { sleep 50 sendinput {wheelup} } Loop, %YFields% { Loop, %Xfields% { MouseGetPos, origX, origY MouseClick, left, PlantMenuX, PlantMenuY ; need to water and fert here.... maybe MouseMove, %origX%, %origY% if (A_Index >= Xfields) break MouseGetPos, origX, origY MouseClick, Left, %winXLeft%, %winYCenter% MouseMove, %origX%, %origY% Sleep, MoveDelay } MouseGetPos, origX, origY MouseClick, Left, %winXCenter%, %winYUp% MouseMove, %origX%, %origY% Sleep, MoveDelay Loop, %Xfields% { MouseGetPos, origX, origY MouseClick, left, PlantMenuX, PlantMenuY ; need to water and fert here.... maybe MouseMove, %origX%, %origY% if (A_Index >= Xfields) break MouseGetPos, origX, origY MouseClick, Left, %winXRight%, %winYCenter% MouseMove, %origX%, %origY% Sleep, MoveDelay } if (A_Index >= Yfields) break ; Leave some space in the middle to stand. MouseGetPos, origX, origY MouseClick, Left, %winXCenter%, %winYUp% MouseMove, %origX%, %origY% Sleep, MoveDelay MouseGetPos, origX, origY MouseClick, Left, %winXCenter%, %winYUp% MouseMove, %origX%, %origY% Sleep, MoveDelay } ; Viewing angle. Sendinput {F5} loop, 10 { sleep 50 sendinput {wheeldown} } return } ; Alt-shift-click -- Fill up water and fertiliser - barley !+Lbutton:: Click MouseGetPos, mousex, mousey mx := mousex + 192 my1 := mousey +23 my2 := mousey +43 my3 := mousey +63 sleep 100 MouseGetPos, mousex, mousey Click, %mx%, %my1% sleep 100 Click, %mx%, %my2% ;Uncomment following to use weedkiller ;sleep 100 ;Click, %mx%, %my3% MouseMove, mousex, mousey sleep 100 Send {ESC} return ; Alt-shift-Right-click -- Harvest barley !+Rbutton:: Click MouseGetPos, mousex, mousey mx := mousex + 105 my1 := mousey +88 sleep 100 MouseGetPos, mousex, mousey Click, %mx%, %my1% MouseMove, mousex, mousey sleep 100 Send {ESC} return