Display search results in AppleScript window?

With the help of some great folks here at MacScripter I’ve been putting together a few scripts to help me automate and streamline web searches. However, instead of relying on web browser pages to display results, would it be possible to tweak some of my scripts to display results in an easy-to-read AppleScript window? This won’t be possible for all of the sites I draw on, I know (for a variety of reasons), but for any of them where I can get a curl result back, would this be realistically achievable? Here is an example:

do shell script "curl http://www.dict.cc/?s=arbeitnehmer%C3%BCberlassung | grep c1Arr"

The result displayed is:

“var c1Arr = new Array("","employee assignment","transfer of personnel","temp-to-perm");”

Of course, I’d like to be able to draw on more than just one site at a time and find a way to cut out the extra bits between the entries, but I’m trying to see how realistic this might be in the first instance.

I put one script together to get returns from Dictionary.com, but if the result is more than a few words/couple of lines, the little text box it appears in doesn’t expand and so the result is cut off.

Any suggestions on how best to approach this?

Many thanks

The only way to display something directly is ‘display alert’ or ‘display dialog’…

do shell script "curl http://www.dict.cc/?s=arbeitnehmer%C3%BCberlassung | grep c1Arr"
display dialog result

… but that would not be “easy to read” with more than a handful of lines.

Look into ‘write’ from Standard Additions. It can write out your result to a plain text file, readable with Textedit.
Here is a tutorial.

Thanks, alastor933.

That’s a really good suggestion. I wasn’t aware of that functionality.

I’ll have a look now.