|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Status & Configuration - Server status and features > MCP Commands - Window Control |
MiniRobot Language (MRL) - MCP Window Control Commands
MCP.Show / MCP.ShowWindow
Display or Control MCP Server Window
Purpose
The MCP.Show command controls the visibility and state of the MCP server window. This allows scripts to show, hide, minimize, or restore the server window as needed.
This command is useful for:
• Making the server window visible to the user
• Hiding the window for background operation
• Minimizing the window to system tray
• Controlling window state programmatically
Syntax
MCP.Show|$$STATE
MCP.ShowWindow|$$STATE
Parameters
$$STATE - The window state to set. Valid values include:
SHOW or 1 - Show the window
HIDE or 0 - Hide the window
MINIMIZE - Minimize the window
MAXIMIZE - Maximize the window
RESTORE - Restore from minimized state
TRAY - Minimize to system tray
Return Value
Returns a status code indicating the result:
OK - Window state changed successfully
ERROR - Failed to change window state
Examples
' Example 1: Show the MCP window
MCP.Show|SHOW
' Example 2: Hide the window for background operation
MCP.Show|HIDE
' Example 3: Minimize to system tray
MCP.Show|TRAY
' Example 4: Toggle window visibility
IVV.$$ShowWindow!0
MCP.Show|SHOW
ELS.
MCP.Show|HIDE
EIF.
Remarks
MCP.Show and MCP.ShowWindow are aliases for the same command. The window state change is applied immediately and is visible to the user.
If the MCP server is running as a service or in headless mode, window operations may not be supported and will return an ERROR status.
Error Conditions
The command will fail with an error if:
• The state parameter is missing or invalid
• The server has no GUI window (headless mode)
• Too many parameters are provided
See also:
• MCP.WriteKB - Write to Keyboard Buffer
• MCP.Start - Start MCP Server