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

RemoteControl.GetWindowsListAsJSON

On Windows queries the list of all windows as JSON.

Component Version macOS Windows Linux Server iOS SDK
RemoteControl 11.2 ❌ No ✅ Yes ❌ No ❌ No ❌ No
MBS( "RemoteControl.GetWindowsListAsJSON" { ; Flags; filterClass } )   More

Parameters

Parameter Description Example Flags
Flags Pass 1 to limit to windows from current process. Optional
filterClass Filter by window class name.
You may first query the list for all windows, lookup what target window has as class name and search only for that to reduce data.
"Notepad" Optional

Result

Returns JSON or error.

Description

On Windows queries the list of all windows as JSON.
You can separate this list and pass the window ID values as number to our other Window functions.
Returns a JSON array with JSON objects containing Handle, Class, Title, ID, ProcessID, ThreadID, IsMyProcess, IsVisible, IsIconic, IsZoomed, Left, Top, Right, Bottom, Width, Height.

IsMyProcess is true, if the window belongs to the same process as the plugin is loaded into.

Examples

Find Notepad window:

MBS( "RemoteControl.GetWindowsListAsJSON"; 0; "Notepad"; )

Example result:
[ { "Handle": 591066, "Class": "Notepad", "Title": "Untitled - Notepad", "ID": "15001", "ProcessID": 2780, "ThreadID": 4764, "IsMyProcess": false, "IsVisible": true, "IsIconic": false, "IsZoomed": false, "Left": 799, "Top": 139, "Right": 2241, "Bottom": 882, "Width": 1442, "Height": 743 } ]

Find only Windows in FileMaker itself:

MBS( "RemoteControl.GetWindowsListAsJSON"; 1)

See also

Release notes

Blog Entries

This function checks for a license.

Created 12nd April 2021, last changed 15th June 2021


RemoteControl.GetWindowsList - RemoteControl.HideCursor