Process.IsFrontMost
-------------------

Checks if FileMaker is the frontmost application.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Process](component_Process.md) | [2.9](newinversion29.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Process.IsFrontMost" ) ### Parameters

none

### Result

Returns 1 if FileMaker is frontmost and 0 if not.

### Description

Checks if FileMaker is the frontmost application.  
If the function returns zero, you can call [Process.SetFrontMost](ProcessSetFrontMost.md) to move FileMaker to the front.  
Added support for Windows in plugin version 4.2.  
### Examples

Check if we are in background and move us to front:

 If \[ MBS ( "Process.IsFrontMost" ) = 0 \]   
 Set Variable \[ $r ; Value: MBS ( "[Process.SetFrontMost](ProcessSetFrontMost.md)" ) \]   
End If  
### See also

- [FM.RunScriptIdle](FMRunScriptIdle.md)
- [Process.KeepFrontMost](ProcessKeepFrontMost.md)
- [Process.SetFrontMost](ProcessSetFrontMost.md)
- [Schedule.StartScriptOnIdle](ScheduleStartScriptOnIdle.md)

### Example Databases

- [Mac only/Process FrontMost](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Process%20FrontMost.shtml#2ScriptAnchor_)
- [Utility functions/Process Info](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Utility%20functions/Process%20Info.shtml#1ScriptAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 4.2pr4](https://www.mbsplugins.de/archive/2014-04-22/MBS_Filemaker_Plugin_version_4/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.9pr9](https://www.mbsplugins.de/archive/2012-09-29/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 25th November 2019

  
[Process.GetQOSClass](ProcessGetQOSClass.md) - [Process.IsRunning](ProcessIsRunning.md)

[HTML Version](ProcessIsFrontMost.shtml)