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: 10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5    Statistic    FMM    Blog  

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

Videos

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


RemoteControl.GetWindowsList - RemoteControl.HideCursor

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos

Start Chat