Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
ProcessActivity.beginActivity
Begins an activity.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Process | 5.2 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ✅ Yes |
MBS( "ProcessActivity.beginActivity"; activity { ; Reason } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
activity | The activity as a number or a text. The plugin allows you to pass texts like IdleDisplaySleepDisabled, IdleSystemSleepDisabled, UserInitiated, UserInitiatedAllowingIdleSystemSleep, Background and LatencyCritical. Those texts can be combined. | "IdleDisplaySleepDisabled" | |
Reason | The reason text. May appear in a log for macOS. |
"Doing backup" | Optional |
Result
Returns reference number or error.
Description
Begins an activity.Pass in an activity to this function, and a non-empty reason string. Indicate completion of the activity by calling the corresponding ProcessActivity.endActivity function with the result of this function. The reason string is used for debugging.
Requires macOS 10.9 and newer.
This function allows to deactivate App Nap for FileMaker. So when a script has to do some work, you can disable system/display sleep here which also disables app nap.
Added Windows support with version 13.0. Supported flags are IdleDisplaySleepDisabled, IdleSystemSleepDisabled, UserInitiated and UserInteractive.
See also iOSApp.SetIdleTimerDisabled function.
Examples
Start an activity:
MBS( "ProcessActivity.beginActivity"; "IdleSystemSleepDisabled UserInitiated"; "Doing Backup in FileMaker" )
Avoid display sleep:
MBS( "ProcessActivity.beginActivity"; "IdleDisplaySleepDisabled UserInitiated"; "Showing animation" )
See also
- iOSApp.SetIdleTimerDisabled
- ProcessActivity.endActivity
- ProcessActivity.Options
- ProcessActivity.Reason
Release notes
- Version 13.3
- Changed reason parameter in ProcessActivity.beginActivity function to be optional.
- Fixed problem with ProcessActivity.beginActivity not working well on Windows.
- Version 13.0
- Added Windows support for ProcessActivity.beginActivity function.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 13.3pr2
- MBS FileMaker Plugin, version 13.3pr1
- Caffeinate FileMaker Pro
- Neues MBS Plugin 13.0 für Claris FileMaker
- MBS Plugin 13.0 for Claris FileMaker
- MBS FileMaker Plugin, version 12.6pr4
- MBS FileMaker Plugin, version 5.2pr2
- Disable App Nap, System and Screen Sleep in FileMaker
This function is free to use.
Created 2nd June 2015, last changed 19th June 2023