自动化使用 ChatGPT 生成 PPT 大纲 - 基于 Python 和 PyAutoGUI

这篇文章将指导您利用 Python 的 pyautogui 库创建一个自动化的脚本,帮助您使用 ChatGPT 生成公司智能管理平台的 PPT 大纲。该脚本将打开 Chrome 浏览器,访问 ChatGPT 并输入相应的提示词,让 ChatGPT 为您创建 PPT 大纲。

C:\pythoncode\new\pyautoguiChatgpt.py

全部代码:

import pyautogui
import time

# Open Chrome
pyautogui.hotkey('win', 'r')
pyautogui.write('chrome')
pyautogui.press('enter')

# Go to ChatGPT
time.sleep(5)
pyautogui.hotkey('ctrl', 'l')
pyautogui.write('https://chat.openai.com/')
pyautogui.press('enter')
pyautogui.press('enter')

# Switch to English input mode (adjust shortcuts as needed)
# pyautogui.hotkey('ctrl', 'shift')  # Common shortcut for language switching
# pyautogui.hotkey('alt', 'e')  # Specific shortcut for English (may vary)

# Focus on the chat input area
time.sleep(10)
pyautogui.click(x=500, y=600)  # Adjust coordinates if needed

# Enter prompt and press Enter
pyautogui.hotkey('ctrl','v')
pyautogui.press('enter')

导入必要的库:

代码首先

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值