AutoMessenger


NameAutoMessenger JSON
Version 0.2 PyPI version JSON
download
home_pagehttps://github.com/imzulkar/automessnger
SummaryA Python package to send automated messages using pyautogui
upload_time2024-08-28 21:50:32
maintainerNone
docs_urlNone
authorGM Zulkar Nine
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AutoMessenger

AutoMessenger is a Python package designed to automate the sending of messages using `pyautogui`. It allows you to send messages at random intervals to a specified input field, with support for custom and default messages.

## Features

- **Automated Messaging**: Send messages automatically at random intervals.
- **Customizable Messages**: Use default messages or specify your own custom messages.
- **Input Field Positioning**: Set the exact location where messages will be typed.
- **Flexible Timing**: Specify the delay before starting and randomize message sending intervals.

## Installation

To install AutoMessenger, ensure you have Python 3.6+ installed on your system. You can install the package from PyPI using pip:

```bash
pip install AutoMessenger
```

## Usage

After installation, you can use the `AutoMessenger` class to start sending automated messages. Below are detailed instructions and examples for using the package.

### Basic Example

Here is a simple example demonstrating how to use AutoMessenger:

```python
from AutoMessenger import AutoMessenger

# Define custom messages
external_messages = [
    "Good Morning!",
    "What's up?",
    "Hope you're doing well!"
]

# Create an instance of AutoMessenger with custom messages
messenger = AutoMessenger(external_messages=external_messages)

# Set the input field where messages will be typed
messenger.set_input_position()  # Wait 5 seconds to record the position of the input field

# Start sending messages with a 10-second delay before the first message
messenger.start_sending(delay=10)
```

### Step-by-Step Instructions

#### 1. Setting Up the Input Position

The `set_input_position()` method records the cursor position for the input field where messages will be sent. Place your cursor over the desired input field and call this method. The script will wait 5 seconds for you to position the cursor.

```python
messenger.set_input_position()
```

#### 2. Providing Custom Messages

You can provide your own list of messages to be sent. If no external messages are provided, the package will use its default messages.

```python
external_messages = [
    "Hello there!",
    "How are you today?",
    "What's new?"
]

messenger = AutoMessenger(external_messages=external_messages)
```

#### 3. Starting the Messenger

Use the `start_sending()` method to begin the messaging process. You can specify a delay (in seconds) before the first message is sent. Messages will be sent at random intervals (between 1 to 5 seconds).

```python
messenger.start_sending(delay=10)
```

#### 4. Stopping the Messenger

To stop the script, press `Ctrl+C` in your terminal. This will interrupt the process and stop sending messages.

## Detailed Explanation

### Class: `AutoMessenger`

- **Initialization**: Initialize with an optional list of custom messages. If none are provided, default messages are used.
- **`set_input_position()`**: Waits 5 seconds and records the cursor position to type messages.
- **`send_message()`**: Chooses a random message from the list and types it into the specified input field.
- **`start_sending(delay)`**: Begins sending messages after the specified delay. Messages are sent at random intervals until interrupted.

### Dependencies

- **`pyautogui`**: Required for simulating keyboard and mouse actions. Install it manually if needed:

```bash
pip install pyautogui
```

## Example Script

For a complete example of using AutoMessenger, you can use the following script:

```python
from AutoMessenger import AutoMessenger

# Custom messages
external_messages = [
    "Hello there!",
    "How are you today?",
    "What's new?"
]

# Initialize AutoMessenger
messenger = AutoMessenger(external_messages=external_messages)

# Set cursor position for the input field
messenger.set_input_position()  # Wait for 5 seconds to set the cursor position

# Start sending messages
messenger.start_sending(delay=10)  # Messages will start sending after 10 seconds
```

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

## Contributing

Contributions are welcome! Please submit issues and pull requests on GitHub.

## Contact

For any questions or issues, please contact:

- **Author**: GM Zulkar Nine
- **Email**: gmzulkar@gmail.com
- **GitHub**: [Your GitHub Profile](https://github.com/imzulkar)

### Summary of Additions:

- **Basic Example**: Provides a simple usage example.
- **Step-by-Step Instructions**: Detailed guidance on setting up input position, providing custom messages, starting the messenger, and stopping it.
- **Detailed Explanation**: Explanation of the `AutoMessenger` class and its methods.
- **Dependencies**: Lists and explains the required dependency.
- **Example Script**: Provides a complete script for practical use.
- **License and Contributing**: Basic information on the license and contributing guidelines.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/imzulkar/automessnger",
    "name": "AutoMessenger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "GM Zulkar Nine",
    "author_email": "gmzulkar@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c2/0d/71ee15edc7258e7cbbdb2da5ce4bbfdd2f10f5255f18ac3b7fd3b0351390/AutoMessenger-0.2.tar.gz",
    "platform": null,
    "description": "# AutoMessenger\r\n\r\nAutoMessenger is a Python package designed to automate the sending of messages using `pyautogui`. It allows you to send messages at random intervals to a specified input field, with support for custom and default messages.\r\n\r\n## Features\r\n\r\n- **Automated Messaging**: Send messages automatically at random intervals.\r\n- **Customizable Messages**: Use default messages or specify your own custom messages.\r\n- **Input Field Positioning**: Set the exact location where messages will be typed.\r\n- **Flexible Timing**: Specify the delay before starting and randomize message sending intervals.\r\n\r\n## Installation\r\n\r\nTo install AutoMessenger, ensure you have Python 3.6+ installed on your system. You can install the package from PyPI using pip:\r\n\r\n```bash\r\npip install AutoMessenger\r\n```\r\n\r\n## Usage\r\n\r\nAfter installation, you can use the `AutoMessenger` class to start sending automated messages. Below are detailed instructions and examples for using the package.\r\n\r\n### Basic Example\r\n\r\nHere is a simple example demonstrating how to use AutoMessenger:\r\n\r\n```python\r\nfrom AutoMessenger import AutoMessenger\r\n\r\n# Define custom messages\r\nexternal_messages = [\r\n    \"Good Morning!\",\r\n    \"What's up?\",\r\n    \"Hope you're doing well!\"\r\n]\r\n\r\n# Create an instance of AutoMessenger with custom messages\r\nmessenger = AutoMessenger(external_messages=external_messages)\r\n\r\n# Set the input field where messages will be typed\r\nmessenger.set_input_position()  # Wait 5 seconds to record the position of the input field\r\n\r\n# Start sending messages with a 10-second delay before the first message\r\nmessenger.start_sending(delay=10)\r\n```\r\n\r\n### Step-by-Step Instructions\r\n\r\n#### 1. Setting Up the Input Position\r\n\r\nThe `set_input_position()` method records the cursor position for the input field where messages will be sent. Place your cursor over the desired input field and call this method. The script will wait 5 seconds for you to position the cursor.\r\n\r\n```python\r\nmessenger.set_input_position()\r\n```\r\n\r\n#### 2. Providing Custom Messages\r\n\r\nYou can provide your own list of messages to be sent. If no external messages are provided, the package will use its default messages.\r\n\r\n```python\r\nexternal_messages = [\r\n    \"Hello there!\",\r\n    \"How are you today?\",\r\n    \"What's new?\"\r\n]\r\n\r\nmessenger = AutoMessenger(external_messages=external_messages)\r\n```\r\n\r\n#### 3. Starting the Messenger\r\n\r\nUse the `start_sending()` method to begin the messaging process. You can specify a delay (in seconds) before the first message is sent. Messages will be sent at random intervals (between 1 to 5 seconds).\r\n\r\n```python\r\nmessenger.start_sending(delay=10)\r\n```\r\n\r\n#### 4. Stopping the Messenger\r\n\r\nTo stop the script, press `Ctrl+C` in your terminal. This will interrupt the process and stop sending messages.\r\n\r\n## Detailed Explanation\r\n\r\n### Class: `AutoMessenger`\r\n\r\n- **Initialization**: Initialize with an optional list of custom messages. If none are provided, default messages are used.\r\n- **`set_input_position()`**: Waits 5 seconds and records the cursor position to type messages.\r\n- **`send_message()`**: Chooses a random message from the list and types it into the specified input field.\r\n- **`start_sending(delay)`**: Begins sending messages after the specified delay. Messages are sent at random intervals until interrupted.\r\n\r\n### Dependencies\r\n\r\n- **`pyautogui`**: Required for simulating keyboard and mouse actions. Install it manually if needed:\r\n\r\n```bash\r\npip install pyautogui\r\n```\r\n\r\n## Example Script\r\n\r\nFor a complete example of using AutoMessenger, you can use the following script:\r\n\r\n```python\r\nfrom AutoMessenger import AutoMessenger\r\n\r\n# Custom messages\r\nexternal_messages = [\r\n    \"Hello there!\",\r\n    \"How are you today?\",\r\n    \"What's new?\"\r\n]\r\n\r\n# Initialize AutoMessenger\r\nmessenger = AutoMessenger(external_messages=external_messages)\r\n\r\n# Set cursor position for the input field\r\nmessenger.set_input_position()  # Wait for 5 seconds to set the cursor position\r\n\r\n# Start sending messages\r\nmessenger.start_sending(delay=10)  # Messages will start sending after 10 seconds\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please submit issues and pull requests on GitHub.\r\n\r\n## Contact\r\n\r\nFor any questions or issues, please contact:\r\n\r\n- **Author**: GM Zulkar Nine\r\n- **Email**: gmzulkar@gmail.com\r\n- **GitHub**: [Your GitHub Profile](https://github.com/imzulkar)\r\n\r\n### Summary of Additions:\r\n\r\n- **Basic Example**: Provides a simple usage example.\r\n- **Step-by-Step Instructions**: Detailed guidance on setting up input position, providing custom messages, starting the messenger, and stopping it.\r\n- **Detailed Explanation**: Explanation of the `AutoMessenger` class and its methods.\r\n- **Dependencies**: Lists and explains the required dependency.\r\n- **Example Script**: Provides a complete script for practical use.\r\n- **License and Contributing**: Basic information on the license and contributing guidelines.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python package to send automated messages using pyautogui",
    "version": "0.2",
    "project_urls": {
        "Homepage": "https://github.com/imzulkar/automessnger"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b45e2ce4f949e1ba47e4e840541894b2b3623d55dc6f652318ff6f899478803a",
                "md5": "444348b8e74b120b0bee7cf0ed283909",
                "sha256": "f750da1241b272ba10d3f4b2b3111828b54335ab6206e653607333189bd1e4b9"
            },
            "downloads": -1,
            "filename": "AutoMessenger-0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "444348b8e74b120b0bee7cf0ed283909",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4742,
            "upload_time": "2024-08-28T21:50:30",
            "upload_time_iso_8601": "2024-08-28T21:50:30.742905Z",
            "url": "https://files.pythonhosted.org/packages/b4/5e/2ce4f949e1ba47e4e840541894b2b3623d55dc6f652318ff6f899478803a/AutoMessenger-0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c20d71ee15edc7258e7cbbdb2da5ce4bbfdd2f10f5255f18ac3b7fd3b0351390",
                "md5": "049cb6689b44ca74ceca20e45a639cf6",
                "sha256": "e11e0e6581e778cbc4baf103a5876758b81bfd359f66278911630ad6b3350539"
            },
            "downloads": -1,
            "filename": "AutoMessenger-0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "049cb6689b44ca74ceca20e45a639cf6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 4568,
            "upload_time": "2024-08-28T21:50:32",
            "upload_time_iso_8601": "2024-08-28T21:50:32.685292Z",
            "url": "https://files.pythonhosted.org/packages/c2/0d/71ee15edc7258e7cbbdb2da5ce4bbfdd2f10f5255f18ac3b7fd3b0351390/AutoMessenger-0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-28 21:50:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imzulkar",
    "github_project": "automessnger",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "automessenger"
}
        
Elapsed time: 0.53048s