|
was another variable?
Hi everyone, I'm trying to do the following: I have a variable containing list of my printers:
$printers="Printer1,Printer2,Printer3"
And I have lists of users who should have access to those printers. These lists of users are kept in variables as well: $Printer1="user1,user2,user3" $Printer2="user5,user4,user2" $Printer3="user4,user1,user10"
And I want to add printers to users in following manner: $ind=$Printers While InStr($ind,',') <>0 $delta=InStr($ind,',') $prin=Substr($ind,1,$delta-1) $ind=Right($ind,Len($ind)-$delta) If Instr($prin,@USERID)>0 $prn_name=Left($prin,InStr($prin,',')-1) AddPrinterConnection ("\\server\"+$prn_name) Else ? 'No printers for this pal!' EndIf Loop
The problem I have is that when I get the printers name (say printer1) and store it as $prin variable, I get $prin value = printer1. But I want it to be "user1,user2,user3" in other words, I want to refer $prin variable which points to $printer1 variable and get the value of $printer1.
Thanks!
|