Can I Use AppleScript To Simulate/Automate Mouse Clicks In Safari?

I’m a beginner at AppleScript. I think I need to simulate the process of visiting a website and clicking certain buttons (I’d be happy to just connect and send the necessary messages directly, but I haven’t been able to do that in REALbasic, and I don’t know any other languages). One of the ideas I had was to use AppleScript to drive Safari, or maybe the shell. I’ve enjoyed using AS and would ordinarily be happy to do some spadework before begging for help, but I have a time frame to solve this problem in, and it would be quite a big savings for me to find out that it can’t be done before I spend a lot of time trying to do it.

Of course, if it can, in fact, be done, I’d love all the help I can get, but just being pointed in the right direction would be a big assist. Thanks in advance for any guidance.

Model: G5
AppleScript: 2.0
Browser: Safari 312.6
Operating System: Mac OS X (10.4)

The answer is yes, and there are lots of examples among these search hits