many of my projects include catalogs, and one of the most tedious tasks is when the client asks me to change the size of the color swatches throughout the catalog. Can a script be written to define the size of the objects with the object style "swatch" applied, and then if they need to be changed, to edit the script to change the size?

It's far easier to write a script that only sets the size of the objects to a predefined value, whether they "need to be changed" or not. (This does assume that all objects with this style should be set to the same size -- which is how I understand your post.)

The top 2 lines in this quick & dirty javascript are the new width & height of the objects, in your current measurement units. The script changes the size from the top left point; that point stays on the original location. It might or might not be what you are doing manually -- of course, just about every other way is possible as well.

This is a javascript. Copy, paste into a plain text editor (Notepad, TextEdit in plain text mode, or Adobe's own ESTK Editor). Save as "ChangeSwatchObjectSize.jsx" into your User Scripts folder. Double-click to run.