#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################### # USAGE: # line up 5 Kettle Windows just next to each other. # Start the macro and click the first window when mousepointer # turns to +. # It will then click the other windows aswell at the same location. # # You may change the relative cords of this macro to sute other # purposes aswell. ######################################### #################### Template ############### # This is a Template, with funktions that all LtMacros should have! | #________________________________________________________________| import time # Needed for delays import LtMacroAPI # Needed for Click to work. ###########This code is needed for LtMacro Kill funktion.### import os # # pid = str(os.getpid()) # pidfile = open("./ltmacros/running.pid", 'w') # pidfile.write(pid) # pidfile.close() # # ( ( windowID, x, y ), junk ) = LtMacroAPI.getwindowclick()# ######################################### # Make the Macro below this line. # size of a kettle menu wx = 170 wy = 275 # position of "flower fertiliser" button ffx = 45 ffy = 180 # position of begin/take button begx = 45 begy = 230 # number of kettles (size of array of menus) nx = 5 ny = 3 ########### macro ####################" iy =0 while iy < ny: ix = 0 while ix < nx: print 'taking from kettle (',ix+1,',',iy+1,')' LtMacroAPI.clickwindow( (windowID, (ix*wx)+begx,(iy*wy)+begy)) time.sleep(0.2) ix=ix+1 iy=iy+1 print 'Done.'