Re: Dynamically Change Printer in UP1.9


Steven Blank
 

Jim,

Where does this printer live, locally attached or network queue?

It may be you need just the printer name, or it may be that you need a computer name, too.

Emacs!

The above example printer happens to be shared as "\\Carol\SamsungML" (without the double quotes).

No? Then, my second guess would be timing; that is, the IO has already been opened (to the default printer) by the time you evaluate the INIPut(), to change the printer name.

No? Then, my third guess would be that you need to make your INI resident (Options, Settings, Environment, Preferences tab, Line 10: Resident MAGIC.INI) and change the "force write" argument in the INIPut() expression to 'TRUE'LOG.

No? Then I give up. ;)

Steve


At 11:24 AM 8/1/2017, you wrote:

Steve, I have done a copy and paste from the Printer properties with the name to make sure about that. That was my first thought.

But it doesn't make a difference.

On Tue, Aug 1, 2017 at 11:46 AM, Steven Blank <sgblank@...> wrote:
Jim,

The most likely explanation is that the printer name specified in the INI file does not match the actual Windows Printer Name. I remember one instance that drove me nuts until I realized that actual the Windows Printer Name had two spaces in it. I thought it was "Zebra LP2824" when, in fact, it was "Zebra  LP2824".

This is a case where a miss is as great as a mile. If the name in the INI doesn't match EXACTLY, Magic falls back to the default printer.

Steve Blank

At 10:29 AM 8/1/2017, you wrote:
>A couple of weeks ago I asked a question about changing printer names dynamically in UP1.9. I received a couple of great answers that work just like I want it to.
>
>I have run into an issue though that is really confusing.
>
>I can change the queue name for a defined printer just fine and it works like it should, at my office.
>
>When I move the program over to the client's though, the INI gets updated, just like it should, but the default printer that comes up on a print dialog is not the one I want. It always goes back to the default printer defined for the workstation.
>
>What might I be missing?
>
>Thanks,
>Jim
>




Join main@magicu-l.groups.io to automatically receive all group messages.