Making Code Run in Browser

Well I have managed to make simple bot that can find a variable and left-click on it for any 2D video game, so that would be the goal right now. And how does the API work?
Sorry for another one, but does robot class work for Processing.