Mac-Automator, How to pipe the output of a shell script to a GUI text box
Asked Answered
P

1

8

The problem I face is this:

I would like to have in a context menu (when i right-click on a folder) an action to be executed and display the output to the user, inside, let's say, a text area window with a vertical scrolling bar. Suppose, that the action is just a shell script that executes a "find" command inside the given directory, searching for a specified pattern.

I have managed to implement it, up to this point, using Automator. What I cannot do is to pipe the output in a synchronous fashion (what is meant by "synchronous" is to have the output print to the user when is produced by the "find" command, and not after the command has finished) in a GUI.

I have spent sometime searching on this and I have come to the conclusion that XCode and Interface Builder have to be put into the play? Am I on the right track? Is there a straightforward and simple way in succeeding in this without having to dig into this framework?

Thank you very much,
Babis

Pharyngoscope answered 9/9, 2010 at 22:3 Comment(1)
you might get some answers on this if you include your programming language as a tag. 'c' ? Also, the expect package has a sub-program called 'unbuffer' that may help with the sychronize things. Good Luck!Clarkclarke
C
-1

You can have the shell script throw a dialog when it gets the result using http://cocoadialog.sourceforge.net/

Cobaltite answered 31/8, 2011 at 0:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.