Printing to Network Printer - no dialoge box

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Printing to Network Printer - no dialoge box

Post by SparkOut » Tue Sep 03, 2019 11:38 pm

No, the <~%printernameGoesHere%~> is a placeholder. This will entirely be replaced by the correct unc pathname for the printer you want to connect. I "hardcoded" the printer name in the sample script, it might need to be adjusted a little, but on that line, it should turn out something like

strUNCPrinter = "\\idkwvmwprn003\HL65"

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Printing to Network Printer - no dialoge box

Post by newpie » Tue Sep 03, 2019 11:39 pm

Ok, let me try again, lol. Sorry for trouble. I will report back.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Printing to Network Printer - no dialoge box

Post by SparkOut » Tue Sep 03, 2019 11:40 pm

The button script does that replacement for you by the way. The vbscript in the custom property should keep the placeholder. It will be replaced again the second time to put the default printer back the way it was.

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Printing to Network Printer - no dialoge box

Post by newpie » Tue Sep 03, 2019 11:52 pm

Ok, I changed it and tweaked the "printer name" a bunch of different methods and still gives me error as I stated before. Not sure what might be going on.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Printing to Network Printer - no dialoge box

Post by SparkOut » Wed Sep 04, 2019 12:03 am

I don't know then, sorry. If you have just copied and pasted the script into the button and the vbscript into the custom properties respectively, then it should work, if it's going to at all. You could try actually installing the printer just to see if there is any more specific information you can gather about the printer hostname in the unc path. More clues might give a direction but I am just throwing out ideas in ignorance here.

newpie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 155
Joined: Sat Jun 29, 2013 11:24 pm

Re: Printing to Network Printer - no dialoge box

Post by newpie » Wed Sep 04, 2019 12:05 am

Thanks for trying. I did try installing it and the original code works great. I will install again and see if there is hidden information. Thx

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”