Page 1 of 1 1
Topic Options
#148429 - 2005-09-23 06:01 PM if i call a function, will setdefaultprinter() still work ...pls help
p00kie Offline
Lurker

Registered: 2005-09-23
Posts: 4
I'm a beginner learning the basics of Kixtart. Twas wondering if someone can help me out with my coding.

Environment: Windows XP-SP2 workstations, Windows 2000 Server

Objective: set default printers, adding printer function works fine

Questions:
1) Set default printer does not work, (error code 2)I've read through the big thread, but I still can't get it to work.
2)when the doc says "printer name" is that the shared device's name under the GENERAL TAB or the SHARING TAB after right-cliking on PROPERTIES

CODE:
Code:
  
IF INGROUP ("zappa\testing")

ADD_PRINTERS()
SETDEFAULTPRINTER("FieryEB-")

IF ADDPRINTERCONNECTION("\\zappa\FieryEb-") = 0
? "Added the fieryeb printer"
SLEEP 5
IF SETDEFAULTPRINTER("FieryEB-") = 0 ;also tried ("\\zappa\FierEB-") did not work as well
? "Setting default printer to fiery"
ENDIF
SLEEP 5
ENDIF
ENDIF

FUNCTION ADD_PRINTERS()
$printer_array = "Ricoh 551", "FieryEB-", "Acct HP 4250", "Xerox DocuColor3535 PS"
FOR EACH $element IN $printer_array
ADDPRINTERCONNECTION("\\zappa\$element")
NEXT
ENDFUNCTION


Top
#148430 - 2005-09-24 12:05 AM Re: if i call a function, will setdefaultprinter() still work ...pls help
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
in setdefault printer it mean the printer's real name.
the one you see when you open up printers list in start menu settings (or what ever it is called in english version of windows)

the share name is only for the share (for connecting to share) and the printer name is what the printer is actually called once it's connected.
I know, it's little confusing but...

to make a remote printer default, you not only need to use the name of the printer but you need to use also the server you have connected to.

so:
setdefaultprinter("\\serverName\Printer's name on the server")
_________________________
!

download KiXnet

Top
#148431 - 2005-09-27 02:35 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
reedmikel Offline
Fresh Scripter
**

Registered: 2005-09-21
Posts: 27
I was the person who started the "long thread" on this subject

Do make sure that you specify the server's name as well as the printer's name, e.g. SetDefaultPrinter("\\servername\printer's name(not the share name)"). That was another part that was not clear in the docs - which have just been revised to help us newbies.

Thanks for the doc enhancements guys! When does it become part of the KiX web download, or has it already?

Top
#148432 - 2005-09-27 02:55 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
reedmikel, the question about the doc change is not related to this thread.
in the thread you started it was answered already.

but here we can see clearly that even though the manual has been updated, it will not remove the confusion.
_________________________
!

download KiXnet

Top
#148433 - 2005-09-27 03:41 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
reedmikel Offline
Fresh Scripter
**

Registered: 2005-09-21
Posts: 27
Sure it is Jooel - the poster had the same questions as I did. I'll bet he did not get the new docs yet. This will clue him in that the docs have been revised and help him with this problem - so my reply is very much on topic.

POOkie - in the KiX docs that you have, does the SetPrinterDefault() command specifically state to use the "printer's name" and further clarify that by telling you NOT to use its sharename? If you have the same docs I have, it does not state that. In fact, it says to USE the sharename IF you added the printer via the AddPrinterConnection() command. That one sentence is/was the major cause of confusion for all us newbies...

Top
#148434 - 2005-09-27 03:52 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Now Mike, you are going over the top. There is no way for docs to be modified retroactively! The new docs came out only yesterday for the RC1 of 4.51! Just let it go!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#148435 - 2005-09-27 04:25 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
reedmikel Offline
Fresh Scripter
**

Registered: 2005-09-21
Posts: 27
Les, are you always looking to butt heads with me? Come on, I'm just trying to help somebody out. I didn't do any name calling, insults etc(like was done to me by folks that will remain nameless:) ). Just leave me alone - would ya?
Top
#148436 - 2005-09-27 04:30 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
reedmikel Offline
Fresh Scripter
**

Registered: 2005-09-21
Posts: 27
I thought it was possible that a newbie who might have just downloaded the latest from the KiX site, in the last day or so, might have gotten the revised docs. Even NTDOC moderator asked if/when the docs had/might be revised. But Jooel never answered whether the official KiX download has the revised docs included yet...

So the question is still out there - has the download been updated too?

-Treat others as if it were the first time you met them. Treat others as you would want to be treated...

Top
#148437 - 2005-09-27 04:31 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Guys - can we please put this SetDefaultPrinter thing to rest. I'm prolly one of the most patient Moderators you'll ever find - but all this noise is really starting to grind my gears. Like Les says - let it go.
Top
#148438 - 2005-09-27 04:38 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
Les Offline
KiX Master
*****

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

Jooel never answered whether the official KiX download has the revised docs included yet...

So the question is still out there - has the download been updated too?



Like I said, docs are NEVER revised retroactively! Since RC1 just got released yesterday, it is not expected that many people would have the new doc or even know about it.

The docs from previous versions will NOT be updated and re-released!

You certainly want to gain mileage on this trivial issue.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#148439 - 2005-09-27 05:26 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
JohnMcD Offline
Lurker
*

Registered: 2005-09-26
Posts: 3
administrator removed unrelated discussion.

like there has been said many times already.
lets not go on chit chat with unrelated issues.

if you have something to say, start your own thread.


Edited by Jooel (2005-09-27 05:50 PM)

Top
#148440 - 2005-09-29 04:52 PM Re: if i call a function, will setdefaultprinter() still work ...pls help
tjcarst Offline
Hey THIS is FUN

Registered: 2003-09-08
Posts: 243
Loc: USA
Why not make your lives easier? Name the printer you install on the server the same name as the share you wish to use. For example on a print server named PS1 you install a printer named research1. Share the printer with the name research1. To connect to it over the network would be \\ps1\research1.

This makes my life much easier.

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
0 registered and 2375 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.066 seconds in which 0.028 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