Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides
New in version: 5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2    Statistic  

Window.FindByTitle

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

Component: Window
Version: 1.1
Mac OS X: Yes
Windows: Yes
Server: No
FileMaker Cloud: No

MBS( "Window.FindByTitle"; WindowName )

Parameters

Parameter Description Example value
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


Window.FindByIndex   -   Window.FlashWindow

Feedback: Report problem or ask question.




Links
MBS REAL studio tutorial videos - Christians Software aus Nickenich