If you want the fields to simply be inaccessible on one or more specific layouts, you can use the Inspector (Data tab) to turn off Field Entry in Browse mode, for the layouts in question.

If you want the fields to be editable only via script (regardless of the layout), then you could consider turning on the checkbox option in the Auto-Enter tab of the Field Options dialog to "Prohibit modification of value during data entry". That will prevent direct manual editing of the field, but won't stop its value being updated by script or button commands.

There are a bunch of other options available if neither of the above meets your needs, but hopefully that gives you a place to start.

As Ray warned, scripts and button-driven script steps can edit fields which are not calcs, even in some cases where the prohibit modification during data entry setting is enabled in the field definition options.

That can come as a big unwanted "feature" if you think you have protected auto-entered data stored as a regular text/date/number. Think about Primary Key fields...

This bit me once when I forgot to test the window mode within a script and programmed the script to set a primary key field thinking it would be in Find mode. It was actualy still in browse mode, and it changed the "uneditable" auto-entered primary key of the current record instead of hunting for another record!