You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need Automator action to set print settings urgently

I need to take prints of a lot of different kinds of documents and I need an automator action that would let me choose on of the presets I have made for the printer. It is usually available when i click Print in the document.

Its kind of urgent.

Neerav

MacBook 5,1, Mac OS X (10.6.3), iPhone OS 3.1.3

Posted on Apr 26, 2010 9:59 PM

Reply
12 replies

May 29, 2010 8:44 AM in response to AceNeerav

A droplet is what you want to build. A droplet is an applescript application that will process files dropped onto them.
on open these_items
repeat with i from 1 to the count of these_items
set this_item to item i of these_items
--enter code that prints this_item
end repeat
end open
You run an on open handler that takes what is dropped on it (ie these_items). You then iterate through each item (ie this_item) and process it as you wish.

May 29, 2010 8:47 AM in response to Barney-15E

Hi, I think you have misunderstood me. I want to write a script that will set the 'settings' for the current print job. Automator is already doing the printing and to i can simple save the workflow as an app and drop files on it. what i want is an action that lets me choose the settings. and i'm not able to figure out how to make one.

May 29, 2010 8:51 AM in response to Barney-15E

In the case of the droplet examples, it iterates through each item, and then passes an alias reference to the process_item handler. That handler is where you would write the code to do the printing.

That example also filters out what file types it can handle. If you don't care what you drop on it, you just want it printed, just get rid of the
and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list))
from
if (folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then

May 29, 2010 8:58 AM in response to AceNeerav

You would process them the same way as the droplet examples. The Run Applescript action accepts whatever was passed to it in the variable 'input' which is an applescript list. Change the handler to:
repeat with i from 1 to the count of input
set this_item to item i of input
set the item_info to info for this_item
if (folder of the item_info is false) and (alias of the item_info is false) then
--do your print script on this_item
end if
end repeat

May 29, 2010 10:22 AM in response to AceNeerav

In AppleScript the printing commands are handled by the individual application rather than globally, and are listed in its Applescript Dictionary (in Script Editor use File>Open Dictionary) under 'Type Definitions>Print'.

Neither Pages nor TextEdit's Dictionaries contain commands for choosing a print preset. Whether other applications do so would be up to the maker of that application. You would only be able to create a droplet for files from one application at a time, even if the one(s) you use do contain these commands.

QuicKeys would certainly enable you to construct what you want - it will automate pretty well anything - but it's not all that cheap ($59.95). I find it invaluable - it's possible to construct very complex automation - but whether it's worth it for just the job you have in mind would be up to you.

Need Automator action to set print settings urgently

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.