Suppressing comments on a post

hey guys,

I am running a script that automatically creates posts. How can I, and where to code it, make these posts not to allow comments?, perhaps on a per category basis.