WMFP.SetPlaybackEndedScriptTrigger
----------------------------------

Sets the playback ended script trigger.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WMFP](component_WMFP.md) | [10.0](newinversion100.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "WMFP.SetPlaybackEndedScriptTrigger"; Player; FileName; ScriptName ) 

**MBS**( **"WMFP.SetPlaybackEndedScriptTrigger";** /\* Sets the playback ended script trigger. \*/  
**$Player**; /\* The reference number for the Windows Media Foundation Player object.e.g. $$Player \*/   
**$FileName**; /\* The name of the FileMaker File that contains the script.e.g. "test.fmp12" \*/   
**$ScriptName**) /\* The name of the script to run.e.g. "MyScript" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Player | The reference number for the Windows Media Foundation Player object. | $$Player |
| FileName | The name of the FileMaker File that contains the script. | "test.fmp12" |
| ScriptName | The name of the script to run. | "MyScript" |

### Result

Returns OK or error.

### Description

Sets the playback ended script trigger.  
The given script is triggered when player reaches the end of the video.  
Pass empty file and script name to clear.  
### See also

- [WMFP.Create](WMFPCreate.md)

### Example Databases

- [Win Only/Windows Player](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Windows%20Player.shtml#2ScriptAnchor_)

### Blog Entries

- [Windows Media Foundation Player for FileMaker](https://www.mbsplugins.de/archive/2019-12-26/Windows_Media_Foundation_Playe/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 25th December 2019 , last changed 25th December 2019

  
[WMFP.SetMute](WMFPSetMute.md) - [WMFP.SetPosition](WMFPSetPosition.md)

[HTML Version](WMFPSetPlaybackEndedScriptTrigger.shtml)