Problem with printing via Folder action script ...

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: Problem with printing via Folder action script ...

Post by rlesperance »

Good morning Ronald,

1. Excuse me. I thought that your question was directed to Emendelson. In OS 9, I use PrintToPDF to eventually print to a regular HP OfficeJet 8500 network printer via FAS. To my knowledge, there is no postscript file involved.

2. As for the 2 scripts (the minimized version and the other involving a delay to print the file as suggested by Emendelson), both of them simply don't work here. I can verify if the scripts work by dragging and dropping files on the FAS folder. From within SheepShaver, I get back to the problem I am trying to solve by this thread.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Problem with printing via Folder action script ...

Post by emendelson »

Yes, when printing with the desktop printer to a file, I need to browse to the destination folder each time again. The folder action scripts works fine, though. Maybe I should try and set up a new desktop printer and see if the destination sticks.
The way to fix this is NOT to print to a folder in the Unix disk, but to a folder in the Mac OS (SheepShaver) virtual disk, and have that SheepShaver folder set up with a folder action script that moves the printfile to a named folder in the Unix disk. That's what I do in my WPMac Applicance:

http://www.columbia.edu/~em36/wpdos/mac-intel.html
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: Problem with printing via Folder action script ...

Post by rlesperance »

Eureka ... I have been trying Hazel this morning. Hazel is a preference pane for OS X. Failing to have a stable success when FAS in SheepShaver, I opened a thread in Mac Scripter for some ideas. I was soon advised to forget FAS for many of the reasons I have already explained in this long thread and also because of the stability with Yosemite.

So, this morning I gave it a try. It worked at once ... without even having to undergo a long learning curve. It worked without a flaw. Hazel does many things, that I am not really all aware of. One thing is sure it is a FAS substitute that I am inviting you to try.

I am trying it out for 14 days, and if it is always as good as today. I will buy it for 29$ .. much worth the 6 days I have been working on this case.

The big bonus with this solution is that since the print folder is sticky in my SheepShaver setup. I don't have to choose between the sticky print folder or the semi-automatic printing. I get a solution without any compromise: I print directly from SheepShaver to OS X with no trade off.

I am very greatful for all the help I found here and that I always find when needed. I think that the instability with Yosemite was giving all of us a hard time to figure out a solution in environnements quite different one from the other. Even on my computer, I had different behavior from one user to another.

Regards.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Problem with printing via Folder action script ...

Post by adespoton »

On the topic of Hazel and Launch Daemons:
http://arstechnica.com/apple/2007/03/in ... -for-os-x/
https://en.wikipedia.org/wiki/Launchd

For the uninitiated, it appears that Hazel is a plist pane interface for creating launchd QueueDirectories entries.

So you can do the same thing by hand. If you want some recipes, try here:
http://www.macnews.com/articles/mactech ... index.html
https://developer.apple.com/library/mac ... dJobs.html

And of course, the man page:
https://developer.apple.com/library/mac ... ist.5.html
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: Problem with printing via Folder action script ...

Post by rlesperance »

Thank you for this information complement ... but for a newby like me, simple is better, since I will probably never go deeper than skin deep with «launchd».
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Problem with printing via Folder action script ...

Post by Ronald P. Regensburg »

rlesperance wrote:In OS 9, I use PrintToPDF to eventually print to a regular HP OfficeJet 8500 network printer via FAS. To my knowledge, there is no postscript file involved.
That explains why the last script that I posted does not work. It will only print .ps files. The scripts are intended to work with the printing setups as described in our "Printing from SheepShaver and BasiliskII" manual. During all of this discussion I assumed that you used setup 4 from this manual. Apparently not.

The printing manual: http://www.emaculation.com/doku.php/she ... k_printing
Last edited by Ronald P. Regensburg on Tue Mar 10, 2015 9:17 pm, edited 1 time in total.
Reason:  
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Problem with printing via Folder action script ...

Post by Ronald P. Regensburg »

Ronald P. Regensburg wrote:Yes, when printing with the desktop printer to a file, I need to browse to the destination folder each time again. The folder action scripts works fine, though. Maybe I should try and set up a new desktop printer and see if the destination sticks.
I created (again) a new desktop printer and the destination sticks. I do not remember when my desktop printers started to forget the destination. The one major change since my last (failing) attempts was the OSX 10.9 to 10.10 upgrade.
rlesperance
Mac Mechanic
Posts: 163
Joined: Thu Mar 17, 2011 1:46 am

Re: Problem with printing via Folder action script ...

Post by rlesperance »

After all this long and tedious thread, one thing is sure: FAS is not solid enough to use to print from OS 9 to OS X. I have never used it for anything else.

Knowing that, using launchd, as suggested by Emendelson and adespoton seems to be the only other available way. I don't have the time right now to dig deepper in launchd ...

Thank you all again.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Problem with printing via Folder action script ...

Post by Ronald P. Regensburg »

I updated the OSX part of our 'Printing from SheepShaver and BasiliskII' guide. (It was last updated for OSX 10.7.)
http://www.emaculation.com/doku.php/she ... k_printing

In the scripts download are now separate folders with scripts for OSX 10.4/10.5 and scripts for OSX 10.6 and later. The 'Print PostScript file' in the first one uses the Printer Setup Utility, the one in the second folder uses a shell script instead.

Everything that worked in OSX 10.6 still works in OSX 10.10 on my late 2013 Intel Core i5 iMac, including printing to a shared printer on the OSX side, a setup that does not need additional scripts or other software.

(Printing to a shared printer on the OSX side has always worked for me. At the time, it did not work for some, including 'emendelson', in a clean OSX 10.8 installation. A bit of a mystery why it did work for me and still does here in Yosemite on a new machine. I may have been migrating some stuff again and again that does not exist in a clean OSX installation.)
Post Reply