I'm running a terminal script and I would really like to send option choices to the OS X GUI, similar to how choice.com works for Windows / DOS, but a GUI version.
I know I can use applescript's choose from list command, but I would prefer a more native app because I think it would run quicker, as well as being more stable and more straight forward to interface with.
I have installed Platypus, and I like how it has the option to output data to a GUI window - but I would like the functionality of passing data back to the script from such a window.
One example scenario might be an easy way to select from a list of folders. This is what it looks like when I do it with Applescript:

set listOfNames to {}
tell application "Finder"
set filelist to every window
repeat with currentFile in filelist
set currentFileName to (POSIX path of (target of currentFile as alias)) as string
copy currentFileName to the end of listOfNames
end repeat
end tell
set mySelection to choose from list listOfNames
However, I would really prefer not to use Applescript.
Resources
Until I can find (or build) the perfect app to do this, I might have to use Applescript. I'm going to list a few resources I've found:
A clever way to do multi-line applescript from the terminal:
Code from here:
#!/bin/sh
# filename: find_me
# usage from Terminal prompt: find_me "Last First"
osascript -e "set the_name to \"$1\"" -e 'on find_me (the_name)
tell application "Address Book"
set the_people to every person
repeat with this_name in the_people
if name of this_name contains the_name then
set result to name of this_name & "\n"
repeat with e_info in emails of this_name
set result to result & value of e_info & " "
end repeat
set result to result & "\n"
repeat with p_info in phones of this_name
set result to result & value of p_info & " "
end repeat
return result
end if
end repeat
end tell
end find_me' -e 'find_me(the_name)'
Also noteworthy from that page: "osascript does not yet provide any way to pass arguments to the script"
"But there is a workaround:"
call osascript -e 'set thename to '$1 -e 'load script "/path/to/script"' -e 'look_up_name(thename)'
And my contribution, a way to force the dialog to be in focus:
#!/bin/sh
osascript -e "set front_app_name to short name of (info for (path to frontmost application))
set listOfNames to {"a", "b", "c"}
tell application front_app_name to choose from list listOfNames"
It is also good to note that you can use multiple -e commands to pass multiple strings to be run.

osascript -e 'tell application "Terminal" to choose from list { "a", "b" }'is instantaneous on my machine. – Daniel Beck♦ Jun 28 '11 at 19:11tell application "Terminal"is the best solution because it launches Terminal if it is not running. If I try and usetell application "Quicksilver"the dialog is not focused when it appears (keyboard nav not possible without a click). Seems like these problems would go away if there was a native app that could accept a list of choices and a callback - or even better if there was a Quciksilver plugin that allowed the results to be returned and displayed as a menu instead of just a block of text. – cwd Jun 28 '11 at 19:55Finderandactivateit. I used Terminal as example, as it's the front application when usingosascriptfrom within it. I didn't expect you to actually have all the other code in AppleScript, since you don't want to actually use it. – Daniel Beck♦ Jun 28 '11 at 20:32