mirror of
https://github.com/trycua/computer.git
synced 2025-12-20 20:40:42 -06:00
fix: correct computer typing helper in docs
Replace the outdated `interface.type()` calls in the Python docs with `interface.type_text()` to match the current Computer SDK API.
This commit is contained in:
@@ -305,7 +305,7 @@ try:
|
||||
|
||||
# Click and type
|
||||
await computer.interface.left_click(100, 100)
|
||||
await computer.interface.type("Hello!")
|
||||
await computer.interface.type_text("Hello!")
|
||||
finally:
|
||||
await computer.close()
|
||||
```
|
||||
|
||||
@@ -247,7 +247,7 @@ try:
|
||||
await computer.interface.right_click(300, 300)
|
||||
await computer.interface.double_click(400, 400)
|
||||
|
||||
await computer.interface.type("Hello, World!")
|
||||
await computer.interface.type_text("Hello, World!")
|
||||
await computer.interface.press_key("enter")
|
||||
|
||||
await computer.interface.set_clipboard("Test clipboard")
|
||||
|
||||
@@ -185,7 +185,7 @@ Connect to your Cua computer and perform basic interactions, such as taking scre
|
||||
# Simulate a left-click at coordinates (100, 100)
|
||||
await computer.interface.left_click(100, 100)
|
||||
# Type "Hello!" into the active application
|
||||
await computer.interface.type("Hello!")
|
||||
await computer.interface.type_text("Hello!")
|
||||
finally:
|
||||
await computer.close()
|
||||
```
|
||||
|
||||
@@ -40,7 +40,7 @@ try:
|
||||
await computer.interface.right_click(300, 300)
|
||||
await computer.interface.double_click(400, 400)
|
||||
|
||||
await computer.interface.type("Hello, World!")
|
||||
await computer.interface.type_text("Hello, World!")
|
||||
await computer.interface.press_key("enter")
|
||||
|
||||
await computer.interface.set_clipboard("Test clipboard")
|
||||
|
||||
Reference in New Issue
Block a user