当我执行正常功能时,我正在尝试创建打开谷歌的快捷方式,但是当我尝试在快捷方式中执行此操作时,它不起作用。
import pyautogui as pg
import keyboard
hotkey1 = "ctrl+alt+w"
def google():
pg.hotkey("win")
pg.typewrite("google\n", 0.05)
while True:
if keyboard.is_pressed(hotkey1):
google()