One option would be to use AppleScript to interact with it. However, unless the company built the app and provided an AppleScript dictionary with it, you’re limited to GUI scripting which is neither the most reliable nor the optimal method of working with it.
That being said, it sounds like you have a macro you are already working on. If that’s the case, please post the macro itself so we can take a look at it and see what might be going wrong. As one of the moderators likes to say, "If we're not testing we're guessing, and guessing often wastes people's valuable time". If you need help on how to post the macro, just let us know and we can walk you through it.
If you haven’t had the opportunity to read this tutorial, I highly recommend it. It will help you get the most help for your question.
Tip: How Do I Get The Best Answer in the Shortest Time?
-Also Chris
EDIT: I also renamed the title of your post to include the app name that way more people are inclined to read further.