RunTask.ReadOutputText
----------------------

Reads what is in the buffer for the output stream.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [RunTask](component_RunTask.md) | [4.1](newinversion41.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |

### Deprecated

This function was [deprecated](deprecated.md). Use [Shell](component_Shell.md) functions instead.

MBS( "RunTask.ReadOutputText" { ; Encoding } ) 

**MBS**( **"RunTask.ReadOutputText";** /\* Reads what is in the buffer for the output stream. \*/  
**$Encoding**) /\* Optional; The text encoding for result.   
Default is native.e.g. "UTF-8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Encoding | The text encoding for result.    Default is native.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "UTF-8" | Optional |

### Result

Returns text or error.

### Description

Reads what is in the buffer for the output stream.  
  
For Windows this is not available, but you can start a .bat file and redirect output to a text file.  
Version 7.5 introduces [shell](component_Shell.md) functions which offer this feature for macOS, Windows and Linux.  
### See also

- [RunTask.Launch](RunTaskLaunch.md)
- [RunTask.NewTask](RunTaskNewTask.md)
- [RunTask.ReadErrorText](RunTaskReadErrorText.md)
- [RunTask.SetArguments](RunTaskSetArguments.md)
- [RunTask.Wait](RunTaskWait.md)

### Example Databases

- [Shell/RunTask/Run Shell Script on Mac](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/RunTask/Run%20Shell%20Script%20on%20Mac.shtml#1ScriptAnchor_)
- [Shell/RunTask/RunTask with read and write on Mac](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/RunTask/RunTask%20with%20read%20and%20write%20on%20Mac.shtml#1ScriptAnchor_)

### Blog Entries

- [Tip of the day: Query connected clients on FileMaker Server by script](https://www.mbsplugins.de/archive/2016-08-17/Tip_of_the_day_Query_connected/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 13th June 2020

  
[RunTask.ReadErrorText](RunTaskReadErrorText.md) - [RunTask.SetArguments](RunTaskSetArguments.md)

[HTML Version](RunTaskReadOutputText.shtml)