SerialPort.HasLine
------------------

Checks if a line is available.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SerialPort](component_SerialPort.md) | [7.0](newinversion70.md) | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |

MBS( "SerialPort.HasLine"; PortReference ) 

**MBS**( **"SerialPort.HasLine";** /\* Checks if a line is available. \*/  
**$PortReference**) /\* The reference number of the port. You get this number from [SerialPort.Open](SerialPortOpen.md) when you open the port.e.g. $port \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PortReference | The reference number of the port. You get this number from [SerialPort.Open](SerialPortOpen.md) when you open the port. | $port |

### Result

Returns 1, 0 or error.

### Description

Checks if a line is available.  
The plugin checks the input buffer for a newline character.  
  
The script trigger pauses after it triggered a script and waits for you to call a function to read. This function clears the flag and allows the script trigger to fire again.  
### See also

- [SerialPort.Open](SerialPortOpen.md)
- [SerialPort.ReadLine](SerialPortReadLine.md)
- [SerialPort.Resume](SerialPortResume.md)
- [SerialPort.Suspend](SerialPortSuspend.md)

### Release notes

- **Version 7.0**
    - Added [SerialPort.HasLine](http://www.mbsplugins.eu/SerialPortHasLine.shtml) and [SerialPort.ReadLine](http://www.mbsplugins.eu/SerialPortReadLine.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 7.0pr1](https://www.mbsplugins.de/archive/2017-01-02/MBS_FileMaker_Plugin_version_7/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 21st December 2016 , last changed 30th January 2025

  
[SerialPort.GetXON](SerialPortGetXON.md) - [SerialPort.IsSuspended](SerialPortIsSuspended.md)

[HTML Version](SerialPortHasLine.shtml)