Open zero-fun opened 1 year ago
I paste content use (hotkey),but sometime unvalid. when i click the window,program run well.but if i open new window in program and copy、paste content,it dont work
win32api.ShellExecute(0, 'open', r'D:\Program Files\xx.exe', '', '', 1) hwnd = win32gui.FindWindow(None, 'xx') shell = win32com.client.Dispatch("WScript.Shell") shell.SendKeys('%') res = win32gui.SetForegroundWindow(hwnd) pyautogui.hotkey('ctrl','l') pyperclip.copy('hello') pyautogui.hotkey('Ctrl', 'v') pyautogui.hotkey('enter')
I paste content use (hotkey),but sometime unvalid. when i click the window,program run well.but if i open new window in program and copy、paste content,it dont work