I’m trying to get my computer to play an online text based game for me by automating a series of keystrokes, in doing so it has to navigate a series of pages and the faster it can do this the better. Right now I’m using System Events to enter the URLs, press buttons, hit return and all that, but I’ve had to use a delay of 5 seconds as my default. The pages generaly load more quickly then that but not always, and when they don’t load fast enough the script gets ahead of itself and stops doing what it’s meant to. I’d like my script to wait only as long as it needs and then continue with the next bit of automation.
Any pointers would be very much appreciated.