Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.
RedDeadDepresso edited this page Nov 9, 2023 · 1 revision

Invite Student

For student names, my approach in BAAuto was as follows: I created a combo box that dynamically displayed student names based on the server language. For instance, if the server was set to CN, the combo box would show Chinese names, and if it was set to EN, it would display English names. Users still had the option to manually enter a student's name if needed.

The algorithm I used for this task is quite straightforward:

  1. I use template matching to see if the student list appeared and retrieve the student name from a configuration file.
  2. Subsequently, I crop the 'momotalk' region, specifically the area defined by coordinates (410, 187, 700, 600).
  3. Next, I utilise OCR to read the names. If the desired name is found in the list, I resize the 'invite' button's height if needed, locate the closest one and click on it. Otherwise, I store the last name on the list and swipe from (600, 500) to (600, 200).
  4. If the last name reappears, it means the end of the list, so I notify the user that no student was found and to check the spelling.

Here is the source code if you need it.

Clone this wiki locally