写作生成文字进阶
Automated Text Typing Every 5 Minutes with Python
来自 prompts.chat 的提示词:Automated Text Typing Every 5 Minutes with Python
提示词正文
复制后可直接粘贴到模型或内部评测工具。
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
pyautoguilibrary to simulate keyboard input - Implement a customizable timer using the
timelibrary - Ensure the script runs continuously and types the text on any writable interface
Example Script:
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:
- Install PyInstaller: Open your terminal or command prompt and run:
pip install pyinstaller - Create Executable: Navigate to the directory containing your Python script and execute:
pyinstaller --onefile your_script_name.py - Find the .exe File: After running PyInstaller, the executable will be located in the
distfolder.
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
使用场景
同步入库后可继续人工润色
参考输出
暂无标准答案,建议按评分维度人工评审。
评分维度
重点评估可执行性、事实准确性、边界控制和结构完整度。
试用与模板
填写变量后复制,或保存到个人工作台模板。
这个模板没有变量,可直接复制使用。
用户评分
0 个评分-
你的评分
登录后评分
评论
0登录后评论