I agree with a lot of users here that Powershell and SMO are much much better choices.
Mike.Renwick..i will look into your Powershell code...its a great start.
Jon Mcghee...is it possible you could share your code?
For other folks who are not inclined on spending too much time on PS/SMO, SQL 2008 has a built in task which can generate SP script file. A bunch of clicks but it gets the job done for light usage DBs
It is also available as a free utility for previous versions.