Skip to main content
Glama

tc_window

Actions on the client application window. Also available: tc_field(action="is_visible"), tc_field(action="is_enabled"), tc_field(action="get_context_menu"), tc_app(action="get_parent").

Instructions

Actions on the client application window. Also available: tc_field(action="is_visible"), tc_field(action="is_enabled"), tc_field(action="get_context_menu"), tc_app(action="get_parent").

  • marks a required action parameter; the group schema treats action parameters as optional. Pass action="name" and only that action's parameters. Actions:

  • activate_window() Activate the current active window. (1C 8.3.3+)

  • answer_dialog(confirm=True, timeout=5) Wait up to timeout seconds and answer a modal question: confirm=true presses Button0, false Button1. Never presses Button2; inspect the question/window for other choices. Returns answered='Да'/'Нет' and question; both null means no dialog, question alone null means unreadable text. (1C 8.3.3+)

  • choose_user_message(text*, ref=null) Click the first user message matching text in the addressed window (active if omitted); * and ? are wildcards. Use get_user_message_texts to read the available messages first. (1C 8.3.3+)

  • close_user_messages_panel(ref=null) Close the addressed window's user-messages panel (active if omitted). This hides the panel; previous messages can reappear when it is reopened. It does not clear message history. (1C 8.3.6+)

  • close_window(ref=null) Close the window at ref, or the active window if omitted. Returns closed only after verifying that the window disappeared. If it remains open, returns window_not_closed and target; inspect the form or answer its dialog before retrying. Also closes an active local print preview when ref is omitted. (1C 8.3.3+)

  • execute_command(command*) Open a navigation link, e.g. 'e1cib/list/Справочник.Контрагенты', 'e1cib/app/Обработка.Имя' or a URL returned by the command interface. For a button name or title, find it and use click. Returns the resulting window; window_changed=false reuses the previous window description. An opened error window is a failure. (1C 8.3.3+)

  • get_command_interface(ref=null, all_sections=False, section=null, search=null, limit=50, offset=0, refresh=False, timeout=120) Read the current command tree of ref (default: main application window), without clicking. all_sections=true waits for stable windows/menu, then scans sections and returns command counts; it changes menus, then attempts to restore them. Stops on window changes; check complete/restored and window_changes inside scan_error/restoration_error. Incomplete results stay cached; inspect the window state before refresh=true. No section read means ok=false. With all_sections=true, section (returned identifier or exact title) or search (path substring) returns cached commands, paged by limit=1..200 and offset; continue with next_offset. Commands contain title, path and url: pass url to execute_command. refresh=true repeats the scan; catalogues are kept until disconnect (up to 20 windows). timeout limits a scan in seconds (0 < timeout <= 3600). (1C 8.3.3+)

  • get_user_message_texts(ref=null, open_if_closed=True) Read messages from ref (active window if omitted). A closed panel is temporarily opened with Ctrl+Shift+Z and closed again; this requires local desktop access and the addressed window to be active (foreground on a shared desktop). Remote clients require an open panel. open_if_closed=false reads without opening; a closed panel returns user_messages_unavailable. Messages can belong to earlier actions or appear late; closing the panel does not erase them. A restore failure returns the messages with ok=false and panel_restored=false. (1C 8.3.3+)

  • goto_next_window(ref=null) Go to the next open window from the addressed main window (active if omitted). The client returns an error if navigation is unavailable. (1C 8.3.6+)

  • goto_previous_window(ref=null) Go to the previous open window from the addressed main window (active if omitted). The client returns an error if navigation is unavailable. (1C 8.3.6+)

  • goto_start_page(ref=null) Go to the start page from the addressed main window (active if omitted). The client returns an error if navigation is unavailable. (1C 8.3.6+)

  • open_user_messages_panel(ref=null) Open ref's user-message panel (active window if omitted); an open panel is left open. Uses Ctrl+Shift+Z: requires a local client and the addressed window active, foreground on a shared desktop. Remote/inaccessible clients return a refusal. Returns opened and panel_open. (1C 8.3.6+) ref selects the client; otherwise set connection_id when several clients are connected. Use tc_session(action="list_connections"). Success may omit target/connection echoes and shorten window details. Use returned references unchanged in ref; re-find expired elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
textNo
limitNo
actionYes
offsetNo
searchNo
commandNo
confirmNo
refreshNo
sectionNo
timeoutNo
all_sectionsNo
connection_idNo
open_if_closedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.9.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "activate_window",
      -  "answer_dialog",
      -  "choose_user_message",
      -  "close_user_messages_panel",
      -  "close_window",
      -  "execute_command",
      -  "get_command_interface",
      -  "get_user_message_texts",
      -  "goto_next_window",
      -  "goto_previous_window",
      -  "goto_start_page"
      -]New value: +[
      +  "activate_window",
      +  "answer_dialog",
      +  "choose_user_message",
      +  "close_user_messages_panel",
      +  "close_window",
      +  "execute_command",
      +  "get_command_interface",
      +  "get_user_message_texts",
      +  "goto_next_window",
      +  "goto_previous_window",
      +  "goto_start_page",
      +  "open_user_messages_panel"
      +]
    • addedInput schema / properties / all_sections
      Added value: +{
      +  "default": null,
      +  "title": "All Sections",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": null,
      +  "title": "Limit",
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": null,
      +  "title": "Offset",
      +  "type": "integer"
      +}
    • addedInput schema / properties / open_if_closed
      Added value: +{
      +  "default": null,
      +  "title": "Open If Closed",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / refresh
      Added value: +{
      +  "default": null,
      +  "title": "Refresh",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / search
      Added value: +{
      +  "default": null,
      +  "title": "Search",
      +  "type": "string"
      +}
    • addedInput schema / properties / section
      Added value: +{
      +  "default": null,
      +  "title": "Section",
      +  "type": "string"
      +}
    • addedInput schema / properties / timeout / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / timeout / type
      Removed value: -"integer"
  2. Changed1 schema field changedv1.7.1
    • addedInput schema / properties / ref
      Added value: +{
      +  "default": null,
      +  "title": "Ref",
      +  "type": "string"
      +}
  3. Changed2 schema fields changedv1.5.0
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "activate_window",
      -  "answer_dialog",
      -  "close_user_messages_panel",
      -  "close_window",
      -  "execute_command",
      -  "get_command_interface",
      -  "get_user_message_texts",
      -  "goto_next_window",
      -  "goto_previous_window",
      -  "goto_start_page"
      -]New value: +[
      +  "activate_window",
      +  "answer_dialog",
      +  "choose_user_message",
      +  "close_user_messages_panel",
      +  "close_window",
      +  "execute_command",
      +  "get_command_interface",
      +  "get_user_message_texts",
      +  "goto_next_window",
      +  "goto_previous_window",
      +  "goto_start_page"
      +]
    • addedInput schema / properties / text
      Added value: +{
      +  "default": null,
      +  "title": "Text",
      +  "type": "string"
      +}
  4. First observedv1.0.0

TDQS

Score is being calculated.