Thank you for all the replies and suggestions. I was looking for a windows solution now but having a linux solution would be useful in the future. I tried some of the software and they seem good to record and duplicate the movement. I was looking for something like a lua library so that I can actually write a test script that reads the GUI placement information from my application and then adjusts the mouse position accordingly so it works in different screen resolutions and different placements of the application window etc.
The solution I am going for, if anyone is interested is writing a C module in Lua which I will share here once I have it tested and used a little bit since it seems that you just need a few lines of C code to move the mouse.
Thanks all for the suggestions,
Milind