1

I have to create services for two different use cases:

  1. Mark a folder or file and zip it using an archiver tool such as rar7zip.
  2. Mark a text and open a translator app.

I've been trying to use Automator and but when selecting the new added service from Services context menu nothing happens. When I look at ~/Library/Services I do see my new services but with workflow extension and not service.

The steps I did for creating a service for the first use case:

  1. In Automator - select Service
  2. Drag the relevant app from the Applications folder
  3. Choose: "files or folders" in the appropriate drop down and Finder.app in the second drop down.

For the second use case I selected "text" and "any application".

What am I doing wrong?

4
  • You forgot to provide the exact names and links to the programs you want to control.
    – Daniel Beck
    Feb 26, 2012 at 9:24
  • Here is a link to a screenshot of the first one:dl.dropbox.com/u/4922553/…
    – user49204
    Feb 26, 2012 at 10:10
  • and here's the link for the second: dl.dropbox.com/u/4922553/…
    – user49204
    Feb 26, 2012 at 10:12
  • See my answer. By dragging files and folders onto Automator, you just select them for further processing, e.g. moving them somewhere, or renaming them, as indicated by the Get Specified Finder Items title.
    – Daniel Beck
    Feb 26, 2012 at 13:20

1 Answer 1

1

When you drag an application to Automator, you're creating a Get Specified Finder Items action. Don't drag them onto Automator, but launch them e.g. from a Run Shell Script or Run AppleScript action. The Launch Application action does not accept file arguments in my testing.

Using Run Shell Script, which receives input as arguments, it looks like this (using CleanArchiver as a substitute):

open -a CleanArchiver "$@"

It also depends on your application what they do when they receive files as input. If your archiver (which I won't buy to test this) automatically bundles them up, you're good. Otherwise you need to workaround the program's limitations.

Note that you can create .zip archives from any file selection's context menu in Finder.


It's not possible to pass selected text as arguments to a program launched e.g. using Launch Application. You need it to be AppleScriptable, or first e.g. write the text to a file. It depends on the application (which you don't even mention). Some options I mention in this and this answer, using web sites in both cases.

Note that for Translation Tab, you already have a service that can translate the selection, and don't need to create one yourself. See the App Store screenshots. It's called Translate Selection with Translate Tab.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .