I'm probably not the one to solve the problem but I'll ask some clarifying questions...
Is the button in a webpage or a desktop app?
Is it always the same button?
What do you mean by follow a button (changing)?
Are you trying to do this on Mac or PC?
Are you trying to follow the button using a camera looking at the screen or using software running on the laptop?
Are you trying to write the software or are you trying to find an automation app that can do this?