Dialog Box

I am writing a script to run in OS X and need to know the command to make a dialog box click the OK button so that the script will continue to run… I know there is PreFab player for OS 9, but I was hoping to get around that if possible… thanks!!