help a greenie

Hello all,
Is it possible to change the default printer via script in OSX 3.1.9? If not, how can the printer be changed during a script?

Thanks for your help.