Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Queries screen position.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Screenshot | 1.0 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
ScreenID | The zero based index of the screen to to target. | 0 |
Get the first screen's co-ordinates
MBS( "Screen.Left" ; 0 ) & "' " &
MBS( "Screen.Top" ; 0 ) & "' " &
MBS( "Screen.Width" ; 0 ) & "' " &
MBS( "Screen.Height" ; 0 )
Figure out on which screen the first window is:
Let([
WindowCenterX = MBS( "Window.GetLeft"; 0 ) + MBS( "Window.GetWidth"; 0 );
WindowCenterY = MBS( "Window.GetTop"; 0 ) + MBS( "Window.GetHeight"; 0 );
$ScreenIndex = -1;
r = While (
[
c = MBS( "Screen.Count" );
i = 0
] ;
i < c ;
[
l = MBS( "Screen.Left"; i );
t = MBS( "Screen.Top"; i );
w = MBS( "Screen.Width"; i );
h = MBS( "Screen.Height"; i );
$ScreenIndex = If(
(l ≤ WindowCenterX) AND
(t ≤ WindowCenterY) AND
(WindowCenterX ≤ l + w) AND
(WindowCenterY ≤ t + h) ; i; $ScreenIndex );
i = i + 1 ] ; 0 )
]; $ScreenIndex)
This function checks for a license.
Created 18th August 2014, last changed 2nd March 2022