Merge remote-tracking branch 'origin/main'

# Conflicts:
#	desktop_env/controllers/setup.py
This commit is contained in:
Timothyxxx
2024-01-15 13:51:11 +08:00
12 changed files with 356 additions and 24 deletions

View File

@@ -197,8 +197,10 @@ class PythonController:
if "text" not in parameters:
raise Exception(f"Unknown parameters: {parameters}")
# deal with special ' and \ characters
text = parameters["text"].replace("\\", "\\\\").replace("'", "\\'")
self.execute_python_command(f"pyautogui.typewrite('{text}')")
# text = parameters["text"].replace("\\", "\\\\").replace("'", "\\'")
# self.execute_python_command(f"pyautogui.typewrite('{text}')")
text = parameters["text"]
self.execute_python_command("pyautogui.typewrite({:})".format(repr(text)))
elif action_type == "PRESS":
if "key" not in parameters: