Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created an automator application that searches a shared folder on another mac within the network.

I want to show all the results in one window.

I have tried using Reveal Find Items, but it opens up the directory of which each file is in, not exactly ideal.

share|improve this question
up vote 2 down vote accepted

View results only works as a workflow during debugging - as a standalone app it goes nowhere. I'm looking for a way to display all the results in a simple window (simpler than showing as finder items), and not finding much. My current answer is to use a python script step with Tkinter, adding a listbox for my items.

import sys
from Tkinter import *
try:
  root = Tk()
  sb = Scrollbar(root)
  sb.pack(side=RIGHT, fill=Y)
  lb = Listbox(root, yscrollcommand=sb.set)

  for f in sys.argv[1:]:
    lb.insert(END, f)
    index = lb.size() - 1
    if index % 2:
        lb.itemconfig(index, bg='light blue')

  lb.pack(side=LEFT, fill=BOTH)
  sb.config(command=lb.yview)

  root.mainloop()
except:
  import traceback
  import sys
  traceback.print_exc(file=sys.stdout)
  exit(0)

This code creates a window with a scrolling list, with coloured alternating rows, and because automator tends to eat python tracebacks (they are shown as an error, but only the first line to stderr is shown), I reroute the traceback to stdout and return with a 0 error code so I can see the traceback in the results tab.

share|improve this answer
    
Thanks for the solution to make Automator display Python error message. That saved my debug time:) – Sean Apr 14 '14 at 6:15

You must log in to answer this question.

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