Running the initial script creates three tables dba_indexDefragLog, dba_indexDefragStatus and dba_indexDefragExclusion, creates a stored procedure [dba_indexDefrag_sp] and adds a function that the stored proc uses.
Once these are in place, simply calling the stored proc would begin defragging every index on every database based on the default settings (which you probably don't want). We've just changed the default @database param to the db we run the script against and added the stored proc to a scheduled task.
Read the comments at the top of the stored proc [dba_indexDefrag_sp] and familiarise yourself with what each parameter does (it is well explained). You'll most likely have no need to change any of them (apart from the @database as mentioned earlier).
It is an excellent script and Michelle deserves all the credit she gets. The one thing that this script doesn't do, that others do, is update the statistics - which is easy enough task to set up separately.
Hope this helps,
Senior Developer/Reluctant Hybrid DBA
Edit - Just spotted it was an old post - DOH!