Thanxs for the response, although im not to sure about what you mean by the text in Bold in the script below?

;************
$wksta=@wksta
$a=function($wksta,5,2) ;take last two char
$what_rm=val($a) ;change to number

if $what_rm > 30
addprinterconnection(\\sever\printer_rm2)
else
addprinterconnection(\\sever\printer_rm1)
endif
;******************

Could you clarify what i have to do where it says "take last to char" and "Change to Number"?????


Thanxs in advance