Code Monkey home page Code Monkey logo

type-simulator's Introduction

Type-Simulator

TypeSimulator is a Python tool designed to simulate human-like typing in text editors. It's useful for demonstrations, tutorials, and testing purposes. The tool uses pyautogui to control keyboard inputs, allowing it to type text into virtually any text editor or text input field.

Features

  • Simulate human-like typing with configurable speed and variance.
  • Open a text editor or application before typing via a script.
  • Type text provided directly via command line or from a text file.
  • Handle special keys and sequences for more complex typing simulations.

Usage

TypeSimulator can be run from the command line. There are several options available:

  • -e/--editor_script: Path to a script to open the text editor or application.
  • -f/--file: Path to a text file whose contents will be typed.
  • -s/--speed: Typing speed in seconds per character. Default is 0.15 seconds.
  • -v/--variance: Variance in typing speed to simulate natural typing. Default is 0.05 seconds.
  • text: Direct text input to type.

Example

To type the contents of a file with a custom typing speed:

python type_simulator.py -f path/to/file.txt -s 0.1 -v 0.02

Peek 2024-03-02 20-55

To type a direct text input:

python type_simulator.py 'echo "Hello, this is TypeSimulator!" > temp.txt'

Peek 2024-03-02 20-53

Customizing TypeSimulator

You can extend the functionality of TypeSimulator by editing the script. For example, you can add more special keys and sequences to the _get_special_keys method.

License

This project is open-source and available under the MIT License.

Contributions

Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.

type-simulator's People

Contributors

djeada avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.