Dekay that waits for a page to load in FireFox.

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. :smiley:

I don’t think Firefox will do this trick, but it works in Safari. See this thread

Camino also has the “do javascript” command so it should work there too.

There’s a register URL echo in Firefox. I’m not sure what this does. Searcing the web didn’t help either.

With Safari, you could also write an InputManager that would run an applescript when the page finishes loading.

I’m pretty sure I can get it to work just as well with Safari as with Firefox. I’ll have to see if they handle tabbing differantly though.

:PThanks for the help!