Text View JSON Format
Alfred's Text View can be dynamically populated from a script which outputs the expected format.
Example JSON Format:
{
"variables": {
"fruit": "banana",
"vegetable": "carrot"
},
"rerun": 0.5,
"response": "Fruits are the seed-bearing structures in flowering plants.",
"footer": "Anatomy of fruits and vegetables",
"behaviour": {
"response": "append",
"scroll": "end",
"inputfield": "select"
}
}
Properties
Alfred uses the following properties to define the view's behaviour:
response : STRING
The text to show in the view.
"response": "Fruits are the seed-bearing structures in flowering plants."
footer : STRING (optional)
Text to show in the window's footer.
"footer": "Anatomy of fruits and vegetables"
actionoutput : true | false (optional, default = false)
When set to true, the Text View closes and the value of response is automatically sent to the next object.
behaviour : OBJECT (optional)
Set how the text view updates after each script rerun. Example:
"behaviour": {
"response": "append",
"scroll": "end",
"inputfield": "select"
}
response : replace | append | prepend | replacelast (optional, default = replace)
Defines how to update the text content.
replacemodifies the full contents of the Text View with the new response.appendadds the response to the bottom of the view.prependadds the response to the top of the view.replacelastmodifies the contents of the last response.
scroll : auto | start | end (optional, default = auto)
Controls the scrolling behaviour of populating text.
autoscrolls to the start of the new response.startscrolls to the start of the Text View.endscrolls to the end of the Text View.
inputfield : clear | select (optional, default = clear)
Defines the behaviour of the input field after actioning with ↩.
clearerases the text of the input field.selecthighlights the text of the input field.
Variables / Session Variables
Variables within a variables object behave the same as their Script Filter counterpart.
Rerunning Text View scripts automatically
Rerunning a Text View script works the same as its Script Filter counterpart.

