If your code
code:
AddPrinterConnection ("\\FILE\SALES_R1045")
AddPrinterConnection ("\\FILE\SALES_FAX")
SetDefaultPrinter ("SALES_R1045")

produces an output of 002 then it means that the two ADDPRINTERCONNECTION functions have a return code of 0 (The function completed successfully) whereas the SETDEFAULTPRINTER has a return code of 2 (Error 2 - The system cannot find the file specified), which in your case would mean the printer.
If you run
code:
$rc=AddPrinterConnection('\\FILE\SALES_R1045')
? 'Error '+@ERROR+' - '+@SERROR
$rc=AddPrinterConnection('\\FILE\SALES_FAX')
? 'Error '+@ERROR+' - '+@SERROR
$rc=SetDefaultPrinter('SALES_R1045')
? 'Error '+@ERROR+' - '+@SERROR
? 'Press any key to continue'
get $keypress

you will se console output. The script will only progress once you hit a key. If you do not see any console output then it might be possible that your script is not running at all. So, please take a step back, and try it again, using the script EXACTLY as I posted it.

And remember, we are all volunteers here, that are trying to help you!
_________________________
There are two types of vessels, submarines and targets.