Page 1 of 1 1
Topic Options
#161203 - 2006-04-26 05:28 PM Return codes
jhdvy Offline
Fresh Scripter

Registered: 2002-03-22
Posts: 44
Loc: New Jersey
I would like to hide the output (zeros) for my printer migration. If searched the forums for examples and have not been able to find one that I fully understand. I see several references to using $RC = but I don't know what to put after $RC.

Example.

AddPrinterConnection ("\\server1\printer1")
AddPrinterConnection ("\\server1\printer2")
AddPrinterConnection ("\\server1\printer3")
If SetDefaultPrinter("\\server\printer")=0
$RC =

Thanks in advance for your help.

Top
#161204 - 2006-04-26 06:16 PM Re: Return codes
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

If searched the forums for examples...



The manual has many examples and I wrote a FAQ on it as well.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#161205 - 2006-04-26 07:32 PM Re: Return codes
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
you may have searched for the wrong keywords ...
look here : Why does the console display zeros and ones (amongst others)?
_________________________



Top
#161206 - 2006-04-26 10:12 PM Re: Return codes
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
If you put $rc = before for example Open(1,"c:\somefile.txt",2). The return code from Open is placed in the $rc variable. You can check on the contents of $rc to see the result or you could just leave $rc alone and be done with it.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.052 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org