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
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| text | No | ||
| limit | No | ||
| action | Yes | ||
| offset | No | ||
| search | No | ||
| command | No | ||
| confirm | No | ||
| refresh | No | ||
| section | No | ||
| timeout | No | ||
| all_sections | No | ||
| connection_id | No | ||
| open_if_closed | No |