Window.SetProgress
------------------

Sets task bar progress.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Window](component_Window.md) | [7.3](newinversion73.md) | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Window.SetProgress"; WindowRef; State { ; Value; Maximum } ) 

**MBS**( **"Window.SetProgress";** /\* Sets task bar progress. \*/  
**$WindowRef**; /\* Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window.e.g. 0 \*/   
**$State**; /\* The state to set.  
Can be NoProgress, Indeterminate, normal, error or paused.e.g. "Normal" \*/   
**$Value**; /\* Optional; Current progress value.e.g. 50 \*/   
**$Maximum**) /\* Optional; The maximum value for progress.e.g. 100 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window. | 0 |  |
| State | The state to set.   Can be NoProgress, Indeterminate, normal, error or paused. | "Normal" |  |
| Value | Current progress value. | 50 | Optional |
| Maximum | The maximum value for progress. | 100 | Optional |

### Result

Returns OK or error.

### Description

Sets task bar progress.  
You can show progress on the task bar icon of your window.  
Usually start with setting to indeterminate, then could up in a script with normal state and finally disable progress indication with setting no progress.   
Requires Windows 7.  
### Examples

Sets progress to 50%:

 MBS ( "Window.SetProgress"; Get(WindowName); "normal"; 50; 100)  
Set progress to indeterminate:

 MBS ( "Window.SetProgress"; Get(WindowName); "indeterminate"  
### See also

- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)

### Example Databases

- [Window/Progress Dialog](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Progress%20Dialog.shtml#3ScriptAnchor_)

### Blog Entries

- [Customize your FileMaker solution](https://www.mbsplugins.de/archive/2021-04-25/Customize_your_FileMaker_solut/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 29th May 2017 , last changed 11st April 2022

  
[Window.SetModified](WindowSetModified.md) - [Window.SetResizable](WindowSetResizable.md)

[HTML Version](WindowSetProgress.shtml)