Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Diomedes

macrumors 6502
Original poster
Oct 5, 2004
250
0
San Francisco
Being a big fan of contextual menus, is there a script, option, or something that can allow you to print files via a contextual menu from the Finder? I know I can drag them on to a printer in the Dock, but I was wondering if there was a way to do it via right-click.
 
The finder currently doesn't have a print command, but you can invoke it through applescript.

I've written a small script which will invoke the print command to any files you select/shift select. Unfortunately I don't know how to hack contextual menus (someone else might), so this script can be run best from the applescript menu.

You will need to put the following script into an applescript editor and save as 'Application':

tell application "Finder"
set myList to selection as list
repeat with x in myList
set myFile to x as alias
try
print myFile
end try
end repeat
end tell


Once you have save the application, put it into the /Library/Scripts folder and it will be available in your applescript menu in the Finder.

If you don't have applescript menu activated, (you should see a script icon in the top right of your menu bar) go to /Applications/applescript and run 'Install Script Menu'.

Unfortunately I can't work out a simple script which will parse every file in the desktop printer. Some files will print directly (eg text files) and others will open an application to print the file eg photoshop files.
 
You can also drag the desktop printer icon to your Finder's sidebar. Still not quite what you're loooking for I know but one step closer! :)
 
After a quick searcg found, OnMyCommand. Looks promising, does what you want and it's free! Plus it has good reviews on MacUpdate and Version Tracker and will do a host of other things too.
 
munkle said:
After a quick searcg found, OnMyCommand. Looks promising, does what you want and it's free! Plus it has good reviews on MacUpdate and Version Tracker and will do a host of other things too.

OK, so I downloaded OnMyCommand...and now what do I do?
 
I don't know much about OnMyCommand but it looks as though you first have to install the OnMyCommandCm.plugin then use OMCEdit to build/add your command into the contextual menu system. The command can be a shell script (there's a print command in the commands link on the website) or an applescript (eg the one I supplied in my earlier post.)

I've never used this software so I guess you'll have to read the manuals and experiment.
 
munkle said:
You can also drag the desktop printer icon to your Finder's sidebar. Still not quite what you're loooking for I know but one step closer! :)

I have done this before and works fast and nice, you don't have to mess any system file, that way you won't be back in some weeks, "My finder doesn't work" , I hope you won't, but why not taking the easy way?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.