Is anyone familiar with Lua coding? More specifically AutoTouch for iPhone?

AutoTouch is a Macro tool for iPhone that can record and play back your operations and simulate human touching & pressing by running Lua scripts. With that being said oh my good lord, I have been sitting here for the better part of 4-5 days trying to figure this out.

What i'm trying to do? I want Autotouch to look for Image1 ON Image2.
Image1 =
Image2=
And every time it sees Image1 displayed on Image2, I want it to click each instance of Image1.

Now I want you to keep in mind I know VERY LITTLE to NOTHING about script or coding in general. I have been reading the Autotouch reddit and Autotouch official website (among other websites) and these are the failures I have been coming up with:

http://collabedit.com/g6tqr

Tl;dr: I want to continuously follow a lot of people with AutoTouch on a not so popular app.

No, not really. I'm learning Swift.