Window.Current
--------------

Queries the reference number of current window.

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

MBS( "Window.Current" ) ### Parameters

none

### Result

Returns number or error.

### Description

Queries the reference number of current window.  
This is same window the plugin would pick if you pass reference number 0 or empty to a window function.  
It can be that the plugin does reference here the data viewer, debugger or some calculation dialog, if one is open.  
The number returned is a number starting 15001 and counting up for each window the plugin sees.  
### Examples

Query current window:

 MBS ("Window.Current")  
Show title of current window:

 MBS ( "[Window.GetTitle](WindowGetTitle.md)" ; MBS ( "Window.Current" ) )  
### See also

- [MapView.GetWindow](MapViewGetWindow.md)
- [Window.GetTitle](WindowGetTitle.md)
- [Window.Parent](WindowParent.md)
- [Window.SetTag](WindowSetTag.md)

### Example Databases

- [Window/Schedule Moved Trigger](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Schedule%20Moved%20Trigger.shtml#1ScriptAnchor_)
- [Window/Window Activation Trigger](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20Activation%20Trigger.shtml#2ScriptAnchor_)

### Blog Entries

- [Window Activation Trigger](https://www.mbsplugins.de/archive/2022-10-23/Window_Activation_Trigger/monkeybreadsoftware_blog_filemaker)
- [Script trigger for moving window](https://www.mbsplugins.de/archive/2022-10-07/Script_trigger_for_moving_wind/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.2pr2](https://www.mbsplugins.de/archive/2015-06-08/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 6th June 2015 , last changed 8th June 2015

  
[Window.ConfigureToolbarMenu](WindowConfigureToolbarMenu.md) - [Window.DisableScrollbars](WindowDisableScrollbars.md)

[HTML Version](WindowCurrent.shtml)