Click Control (CV)

更新时间:
复制 MD 格式

1. Introduction

This component uses the Computer Vision (CV) method to click a control.

2. Inputs

Note

For details about each input parameter, see the help text in the component's properties in the visual editor.

3. Outputs

None

4. Component usage example

4.1. Component configuration example

  1. For Target Control, select the control element captured in CV mode.

  2. For Click Type, keep the default selection, Left-click.

  3. For Control Index, keep the default value of 1.

  4. Keep the default values for the advanced options.

4.2. Example execution result

None

5. Example flow

Workflow

  1. Use the Get Window component to obtain the DingTalk window object, `v_win_obj_1`. Pass this object to the Opened Window Object parameter of the Activate Window component.

  2. Use the Activate Window component to bring the DingTalk window to the foreground.

  3. Use the Move Mouse (CV) component to move the mouse to the DingTalk search box.

    • image

  4. Use the Click Mouse component to click the DingTalk search box.

  5. Use the Delayed Execution component to add a 2 second delay. This ensures that the cursor is in the input box.

  6. Use the (Simulate) Keyboard Input component to enter the name of the contact or group.

  7. Use the Wait For Element to Appear (CV) component to wait for the searched contact to appear.

    • image

  8. Use the Delayed Execution component to add a 1 second delay. This increases the success rate of the subsequent Enter key press.

  9. Use the Input Hotkey component to press the Enter key.

  10. For example, when you press Enter, the delayed execution component performs an automatic switchover to the session of the corresponding contact. Then, execute the following steps.

  11. Use the Click Control (CV) component to click the Settings button in the chat session.

    • image

  12. Use the Click Control (CV) component to click the Clear Chat History button.

    • image

  13. Use the Click Control (CV) component to click the OK button in the dialog box to clear the chat history.

    • image

  14. Use the Fill Input Box (CV) component to enter a message in the input box of the chat session.

    • image

  15. Use the Click Control (CV) component to click the Send button.

    • image

image

Result

The flow sends a message to a specified contact in DingTalk, as shown in the following figure.

The flow activates the DingTalk window, enters a contact name in the search box, and presses Enter to open the chat session. The flow then clears the chat history, which is an optional step, and sends a message to the contact.