코딩
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- ChatGPT에서 열기 (새 탭에서 열림)
- Claude에서 열기 (새 탭에서 열림)
- Gemini에서 열기 (새 탭에서 열림)
Gemini는 링크로 프롬프트를 전달할 수 없어, 먼저 복사해 주세요.
- Perplexity에서 열기 (새 탭에서 열림)
새 탭이 열리고 프롬프트가 미리 입력됩니다. 서비스에 로그인되어 있어야 할 수 있습니다.
이 프롬프트 사용법
- 대괄호로 표시된 부분을 여러분의 내용으로 바꿔서 입력하세요.
- 모델에 따라 결과가 달라집니다. 원하는 답이 아니면 다른 모델을 쓰거나 구체적인 예시를 하나 덧붙이세요.
- 프롬프트는 한 번에 하나의 메시지로 보내세요. 여러 번에 나누면 지시가 약해집니다.