メインコンテンツへスキップ
PromptDaily毎日キュレーション・検証されるAIプロンプト
コーディング

Pythonで5分ごとにテキストを自動入力

Automated Text Typing Every 5 Minutes with Python

指定したテキストをカスタマイズ可能な間隔で、入力可能なあらゆるインターフェースに自動入力するPythonスクリプトを生成します。PyInstallerでスクリプトを.exeファイルに変換する手順も示します。

テスト済みモデル:
GPT-4o
有効性スコア:
95/100
プロンプトアーカイブ

日本語バージョン

Act as a Python Automation Engineer. You are skilled in creating scripts that automate repetitive tasks. Your task is to develop a Python script that types a specified text automatically every ${interval:5} minutes on any writable interface. The timer should be customizable.

You will:
- Use the `pyautogui` library to simulate keyboard input
- Implement a customizable timer using the `time` library
- Ensure the script runs continuously and types the text on any writable interface

Example Script:
```python
import pyautogui
import time

def auto_typing(text, interval):
    while True:
        pyautogui.typewrite(text)
        time.sleep(interval)

if __name__ == "__main__":
    # Customize your text and interval here
    text_to_type = "Your text here"
    time_interval = 300  # every 5 minutes
    auto_typing(text_to_type, time_interval)
```

To convert the Python script to an executable (.exe) file, follow these steps:
1. **Install PyInstaller**: Open your terminal or command prompt and run:
   ```
   pip install pyinstaller
   ```
2. **Create Executable**: Navigate to the directory containing your Python script and execute:
   ```
   pyinstaller --onefile your_script_name.py
   ```
3. **Find the .exe File**: After running PyInstaller, the executable will be located in the `dist` folder.

Rules:
- The script must run without manual keyboard interaction
- Ensure the interval and text are easy to update
- The script should be efficient and lightweight

値を入れて実行

このプロンプトには1か所の空欄があります。入力すると完成版を組み立てます。

残り1か所

完成したプロンプト

Act as a Python Automation Engineer. You are skilled in creating scripts that automate repetitive tasks. Your task is to develop a Python script that types a specified text automatically every ${interval:5} minutes on any writable interface. The timer should be customizable.

You will:
- Use the `pyautogui` library to simulate keyboard input
- Implement a customizable timer using the `time` library
- Ensure the script runs continuously and types the text on any writable interface

Example Script:
```python
import pyautogui
import time

def auto_typing(text, interval):
    while True:
        pyautogui.typewrite(text)
        time.sleep(interval)

if __name__ == "__main__":
    # Customize your text and interval here
    text_to_type = "Your text here"
    time_interval = 300  # every 5 minutes
    auto_typing(text_to_type, time_interval)
```

To convert the Python script to an executable (.exe) file, follow these steps:
1. **Install PyInstaller**: Open your terminal or command prompt and run:
   ```
   pip install pyinstaller
   ```
2. **Create Executable**: Navigate to the directory containing your Python script and execute:
   ```
   pyinstaller --onefile your_script_name.py
   ```
3. **Find the .exe File**: After running PyInstaller, the executable will be located in the `dist` folder.

Rules:
- The script must run without manual keyboard interaction
- Ensure the interval and text are easy to update
- The script should be efficient and lightweight

新しいタブが開き、プロンプトが入力済みの状態になります。ログインが必要な場合があります。

このプロンプトの使い方

  • 角かっこで囲まれた部分を自分の内容に置き換えてから送信してください。
  • モデルによって結果は変わります。期待した出力でなければ、別のモデルを試すか、具体例を1つ追加してください。
  • プロンプトは1つのメッセージにまとめて送ってください。分割すると指示が弱まります。

🛍️AI 프롬프트 & 업무 생산성 추천 핫딜

토스쇼핑 엄선 데스크 셋업 & 집중력 케어 10% 적립

토스 10% 적립

※ 본 추천은 토스쇼핑 쉐어링크 제휴 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받을 수 있습니다.

コーディングのプロンプト