-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Feature Request: write() Function
Description
Implement write() function to type text strings with optional interval between keystrokes.
Proposed API
public static func write(
_ text: String,
interval: TimeInterval = 0
)Parameters
text: The string to typeinterval: Delay between each keystroke (in seconds)
Example Usage
// Type text instantly
SwiftAutoGUI.write("Hello, World\!")
// Type with 0.1 second delay between characters
SwiftAutoGUI.write("Slowly typed text", interval: 0.1)
// Type in a text field
SwiftAutoGUI.click(x: 100, y: 200) // Click on text field
SwiftAutoGUI.write("[email protected]")Implementation Notes
- Parse string into individual characters
- Handle special characters and Unicode properly
- Use existing
keyDown()/keyUp()infrastructure - Add Thread.sleep for interval between keystrokes
Priority
🟡 Medium - Very useful for form filling and text automation
Related to PyAutoGUI
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request