Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Change desktop printer setting in OS 9.04?

 
Goto page Previous  1, 2
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  10.6 computer not showing up on network  
Author Message
Edward Mendelson

External


Since: Dec 05, 2009
Posts: 9



(Msg. 16) Posted: Sat Dec 05, 2009 5:45 pm
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Archived from groups: alt>comp>lang>applescript (more info?)

In article , Dave
Balderstone wrote:

> In article , Edward
> Mendelson wrote:
>
> > Second, I'm
> > sorry to report that both suggestions run without producing any errors,
> > but they leave the destination folder unchanged. I've also tried (out
> > of pure desperation) to tell desktop printer "Test Printer" to make
> > those changes, but that didn't have any effect either.
>
> Are you sure you have the tell statements nested properly? You may have
> to have something like
>
> tell application "Desktop Printer Manager"
> tell desktop printer "Test Printer"
> set properties... etc.
>
> Post the code that runs but gives no results so we can look at it.
>
> Once I can get to my iMac that has SheepShaver installed (and determine
> if SS survived the upgrade to 10.6) I can play with some code, but
> there's currently a wife doing Christmas shopping in front of it and
> interrupting her is NOT a good idea.
>
> Very Happy

Hey Dave,

I share your feelings about sharing code - and I know all about who
gets priority at the computer...

Here's some code that runs but does nothing:

tell application "Desktop Printer Manager"
set printers to get name of every desktop printer as string
if printers contains "Test Printer" then
get destination folder of address of desktop printer "Test
Printer"
set properties of desktop printer "Test Printer" to ¬
{class:address specification, destination folder:alias
"Unix:Folder for PrintFiles:", protocol:translator}
get destination folder of address of desktop printer "Test
Printer"
end if
end tell

If your SheepShaver setup didn't survive into 10.6, there's a build
here that works extremely well:

http://www.emaculation.com/forum/viewtopic.php?p=30713&highlight=#30713

The August 23, 2009 build works best for me. There are newer builds in
the same forum that reportedly work well in some setups, but not in
mine!

Thanks again, and good luck with SheepShaver running under 10.6.

- Edward

 >> Stay informed about: Change desktop printer setting in OS 9.04? 
Back to top
Login to vote
Edward Mendelson

External


Since: Dec 05, 2009
Posts: 9



(Msg. 17) Posted: Sat Dec 05, 2009 6:44 pm
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article , Dave
Balderstone wrote:

> What if you change your approach?
>
> The code above shows you can create a new printer with the destination
> folder you want.
>
> So, can you test for existence of a desktop printer named "Test
> Printer", and if it exists just delete it and create a new one with
> exactly the properties you want?
>
> Lather, rinse, repeat?
>
> I rarely worry about a script I write being "elegant", I just worry
> about getting the results I want. A few CPU cycles are meaningless.
>
> Maybe this is one instance where elegance can be discarded if brute
> force produces results...

That was exactly the approach I tried first. Unfortunately it doesn't
work for these reasons:

1. I'm trying to create a setup that I can bring over to another disk
without any special setup - except for running a script that will set
the output folder (in the way I've been trying to do here). The reason
I need to set the output folder on each new machine is this: even if
the old machine and the new machine both use output folders named
Unix:Folder for Print Files, the Mac OS can figure out that "Unix" is a
different disk in each case, and won't "remember" the output setting so
it needs to be set on each machine.

2. The reason I can't delete and recreate the desktop printer is that
this "print through OS X" method only works if the printer's
"PostScript Settings" are set in a specific way. You have to set these
by printing from an application, choosing PostScript settings from the
dropdown list of settings, and then setting data format to Binary and
font inclusion to "all but standard 13". As far as I can tell, there is
no way to script these, so I can't recreate them each time I create a
desktop printer.

However, the settings do persist even when I change the destination
folder, and that's why I'm trying to script the change in the
destination folder.

Sorry to be so long-winded. This has been a voyage of discovery just to
get this far!

Thanks again....

- Edward

 >> Stay informed about: Change desktop printer setting in OS 9.04? 
Back to top
Login to vote
Dave Balderstone

External


Since: Mar 21, 2006
Posts: 1688



(Msg. 18) Posted: Sat Dec 05, 2009 6:44 pm
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Edward Mendelson

External


Since: Dec 05, 2009
Posts: 1



(Msg. 19) Posted: Sat Dec 05, 2009 8:05 pm
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Dave Balderstone" wrote in message

> In article , Edward
> Mendelson wrote:
>
>> That was exactly the approach I tried first. Unfortunately it doesn't
>> work for these reasons:
>>
>> 1. I'm trying to create a setup that I can bring over to another disk
>> without any special setup - except for running a script that will set
>> the output folder (in the way I've been trying to do here). The reason
>> I need to set the output folder on each new machine is this: even if
>> the old machine and the new machine both use output folders named
>> Unix:Folder for Print Files, the Mac OS can figure out that "Unix" is a
>> different disk in each case, and won't "remember" the output setting so
>> it needs to be set on each machine.
>
> This may be due to the fact you're using "alias". OS9 may be dealing
> with file references differently. (
>
> try something like
>
> set theFolder to "Unix:The folder" as text
> set theFolder to theFolder as alias.
>

Unfortunately, the Desktop Printer Utility always stores theFolder as an
alias that points to the actual disk on which theFolder is located. I've
tried this.

>>
>> 2. The reason I can't delete and recreate the desktop printer is that
>> this "print through OS X" method only works if the printer's
>> "PostScript Settings" are set in a specific way. You have to set these
>> by printing from an application, choosing PostScript settings from the
>> dropdown list of settings, and then setting data format to Binary and
>> font inclusion to "all but standard 13". As far as I can tell, there is
>> no way to script these, so I can't recreate them each time I create a
>> desktop printer.
>
> Do these have to be set in OS X? If so, can you write a script to do
> that in OS X, save it as an app and then have your SheepShaver script
> tell it to activate?

No - these are settings created in OS 9. The idea is that the OS 9
application writes a .PS file using a variety of PostScript (binary,
embedded fonts) that OS X understands. If you don't change the settings in
OS 9, OS 9 uses its default settings, and the resulting .PS file can't be
printed or converted to PDF by OS X.

Enjoy your dinner - and thanks again and again.

- Edward
 >> Stay informed about: Change desktop printer setting in OS 9.04? 
Back to top
Login to vote
Dave Balderstone

External


Since: Mar 21, 2006
Posts: 1688



(Msg. 20) Posted: Sat Dec 05, 2009 8:05 pm
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
Edward Mendelson

External


Since: Dec 05, 2009
Posts: 9



(Msg. 21) Posted: Sat Dec 05, 2009 9:05 pm
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article , Dave
Balderstone wrote:

> In article , Edward
> Mendelson wrote:
>
> > The idea is that the OS 9
> > application writes a .PS file using a variety of PostScript (binary,
> > embedded fonts) that OS X understands.
>
> Can you script the creation of this file using a sample that works?

Not sure I understand the question! What I was trying to say was this:
when you run WordPerfect or any other application in the emulator, you
can open the Print dialog (Cmd-P) and "print" to a .PS file, which you
save in a folder that has an OS X folder action script attached.

I don't script the creation of the .PS file - I use the standard Print
dialog to create it. But maybe you were asking something else??

- Edward
 >> Stay informed about: Change desktop printer setting in OS 9.04? 
Back to top
Login to vote
Edward Mendelson

External


Since: Dec 05, 2009
Posts: 9



(Msg. 22) Posted: Sun Dec 06, 2009 12:44 am
Post subject: Re: Change desktop printer setting in OS 9.04? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article , Dave
Balderstone wrote:


Dave,

I think I've been wasting your time. I now see from the Desktop Printer
Manager dictionary that the address class is read-only. I didn't
realize this because I was looking at the "address specification" and
"translator address" sections of the dictionary, where r/o is not
specified.

Now I think I've got to figure out a way to script the button clicks
and folder navigation in the Desktop Printer Utility to get the same
effect I'm looking for. That's always going to be a bit tricky...

Thanks again for your patience with this - and apologies for any
time-wasting that resulted from my bad dictionary reading.

- Edward
 >> Stay informed about: Change desktop printer setting in OS 9.04? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Setting desktop picture - The following script seems to compile and run properly, with no errors, but nothing happens -- the desktop picture is not changed. set ThePicture to choose file tell application "Finder" <font color=purple> ; set desktop picture...

Setting Desktop Background via AppleScript - In a nuts hell, is it possible? I have an instance where I have two desktop backgrounds that I would like to alternate between. This is easily accomplished by working one's way through system preferences. It would be nice if this process could be..

Change the Desktop Background with Applescript - iBook OS X 10.2.6 Hi I want to use applescript to change the desktop pictures on my Mac. I have a folder of pics that I want as my random backgrounds at a certain time of the day and another folder of pics for the rest of the day. I anticipate running...

help - "Desktop Printer Manager" - I am trying to use the "Desktop Printer Manager" to build network printers at school. No matter what I do, I get an error saying that a PPD file cannot be found for the printer. It doesn't matter if I use the 'PPD file' property or leave ...

Setting the Computer Name in OS X - We are in the process of setting up the disk image for our public Macs but as part of the cleaning up process post install we would like to change the Computer Name to hostname so that Apple Remote Desktop gets the correct name and not 200 instances of..
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]