Move mouse (CV)

更新时间:
复制 MD 格式

Moves the mouse using the computer vision (CV) method.

1. Component description

Moves the mouse to a specified CV control.

2. Inputs

Note

For more information about the input parameters, see the help text for each parameter in the application flow editor.

3. Outputs

None

4. Component usage example

4.1. Configuration example

  1. For Base Position, the control's anchor point is selected by default.

  2. For Target Control, select a captured control element in CV mode.

  3. For Control Index, the default value is 1.

  4. Keep the default advanced settings.

4.2. Example execution result

None

5. Example flow

Build the flow

  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.

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

  5. Use the Delayed Execution component to wait for two seconds. This ensures 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 contact to appear in the search results.

  8. Use the Delayed Execution component to wait for one second. This helps ensure the subsequent Enter key press is successful.

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

  10. Use the Delayed Execution component to wait for the automatic switchover to the contact's chat session before proceeding.

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

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

  13. To clear the chat history, you can use the Click Control (CV) component to click the "OK" button in the pop-up.

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

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

Execution result

This 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. It then clears the chat history (optional) and sends a message to the contact.

image

If you found this helpful, click the Like button.