Re: Using scripts in clips?
- Robert Bull <barlennan@...> wrote:
>I'd consider ^$GetOutput()$ to pass args/variables and get back the results. (For really large blocks of text to process you could just submit the path of the file to open by your AWK script.)
> I have a few clips, and the odd AWK script which works on all the
> (marked?) text in a file. They seem to be two separate ideas.
> Is it possible to use scripts *inside clips*? What I wondered was
> whether one could use NTP's native clip functions to, say, retrieve
> the contents of the clipboard, feed that text through an AWK script,
> and have NTP pick up the result and insert it into the current file.
Here's a purposely overdrawn illustration of one of the ways I utilize for communication between Clip and Lua:
;[path to exe]
;[path to the script]
;[text to process, e.g. ^$GetSelection$, ^$GetClipboard$]
^!InsertText ^$GetOutput(^%lua% "^%script%" "^%input")$