Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Window.FindByTitle

This function can be used to find the Reference to the window.

Component Version macOS Windows Linux Server iOS SDK
Window 1.1 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "Window.FindByTitle"; WindowName )   More

Parameters

Parameter Description Example
WindowName The Name of the window to find MBS_DevTool

Result

Returns window reference number or error.

Description

This function can be used to find the Reference to the window.
The reference is the Operating System's unique ID for the the window. Many of the other functions use the WindowReference to target the window.
The window reference is only valid until the window is closed.
If 0 is returned, no window was found.
Window reference numbers are starting at 15000 and counting up for each new window.

Examples

Application Window Window Ref

Let(
[
/*-----------------PARAMETERS--------------------*/
WindowName =
Case(
Position(Get ( ApplicationVersion ); "Advanced"; 1; 1);"FileMaker Pro Advanced";
"FileMaker Pro"
)

];
/*-------------------FUNCTION----------------------*/
MBS(
"Window.FindByTitle";
WindowName
)
)

Set the Transparency of a window by name

Let(
[
/*-----------------PARAMETERS--------------------*/

FileMakerApplicationWindowName =
Case(
Position(Get ( ApplicationVersion ); "Advanced"; 1; 1);"FileMaker Pro Advanced";
"FileMaker Pro"
);

WindowRef =

MBS(
"Window.FindByTitle";
FileMakerApplicationWindowName
);

Alpha = .5

];
/*-------------------FUNCTION----------------------*/

MBS(
"Window.SetAlpha";
WindowRef;
Alpha
)
)

State of the Window Close Button

Let(
[
windowRef = MBS("Window.FindByTitle"; Get(WindowName))
];


GetAsBoolean(
MBS(
"Window.HasCloseButton";
WindowRef
) = "true"
)


)

Hide a window by name

Let(
[
/*-----------------PARAMETERS--------------------*/
WindowRef = MBS( "Window.FindByTitle" ; "My Window")
];
/*-------------------FUNCTION----------------------*/
MBS(
" Window.Hide ";
WindowRef
)
)

Find window:

MBS( "Window.FindByTitle" ; Get(WindowName))

See also

Release notes

Example Databases

Blog Entries

This function is free to use.

Created 18th August 2014, last changed 10th May 2015


Window.FindByIndex - Window.FlashWindow