(01-05-2015, 09:04 AM)blindpick Wrote: i tried replacing the coordinates but only level 2 barracks is trying to make troops.I fixed following bellow. Add +100 after $TrainPos[0]
level 5 and 4 barracks is not. it's trying to click upgrade.
Code:
Click($TrainPos[0]+100, $TrainPos[1]) ;Click Train Troops button
If _Sleep(500) Or $RunState = False Then ExitLoop(2)
BTW. I think better if the code located first barack and then use arrow key to next barrack