I’m writing an ASS app for a command line utility. When I send my command using the “do shell script” like this…
set theresult to do shell script extractpath & " -v"
set contents of text view "outputText" of scroll view "outputField" of window "monitorWindow" to theresult
set needs display of text view "outputText" of scroll view "outputField" of window "monitorWindow" to true
the window I have set up to get the response only reads the first line of what’s being returned and that’s it. There should be a whole lot of text returned, but I only get one line. I can’t figure out how to solve this issue. Anyone have any ideas? I’m thinking it has to do with the line returns or something, but I can’t figure it out.
What I meant is, can you be more specific about the command? Is this a CLI utility that is installed by Mac OS X or is it a custom third-party tool? If it is the later, is it freely available so others could test it? If not, it looks like you’re on your own.
I promise that I will download the cli utility if this doesn’t work:
--> here your script, redirecting again the output to a file
set shellScript to "ls > /tmp/output.txt"
--> write "shellScript" to file, chmod file, execute file
do shell script "echo " & quoted form of shellScript & " > /tmp/exec; chmod 755 /tmp/exec; /tmp/exec | sh"
--> read output of original "shellScript"
read ("/tmp/output.txt" as POSIX file)
Perhaps such utility only returns the first line when output is not to a shell?
Um, I’m not sure what your code is that is contained in extractpath but the -v parameter for extract-xiso is simply the version string that returns just one line. Even from the Terminal a complete command like:
/usr/local/bin/extract-xiso -c /path/to/folder -v
will just return “extract-xiso v2.1 for macos-x - written by in email@example.com.”
Can you now post the complete code contained in the extractpath variable?