Photoshop Scripting

I’m just discovering Photoshop scripting and was trying out some of your tutorial files.
I am getting errors, i.e., “Wrong type of enumerated value”, etc.

I am using PS CS2 on a mac. Any Ideas?

And can we takes these scripts to use and modify?

Thanks,
Creeker