Desktop automation process for excel like apps

I was trying desktop automation using xclick and xtype on desktop app called gnu cash. There were some issues. It was clicking the right account name only in alternate iteration when I ran the macro multiple times even though i cliked the ss correctly. And it was also not typing in right fields sometimes. So is there any more efficient and reliable commands or any other methods so that I don’t get these errors. I need to automate some excel like desktop app. How can I do that efficiently?

Hi, can you please post a video of your macro running? Maybe we can suggest some workarounds then.