Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import win32gui, win32api, win32con
- h = win32gui.GetForegroundWindow()
- win32gui.SetForegroundWindow(YourPlayerHWND)
- win32api.keybd_event(win32con.VK_CONTROL, 0,0,0)
- win32api.keybd_event(ord('J'), 0,0,0)
- win32api.keybd_event(ord('J'),0 ,win32con.KEYEVENTF_KEYUP ,0)
- win32api.keybd_event(win32con.VK_CONTROL,0 ,win32con.KEYEVENTF_KEYUP ,0)
- if h : win32gui.SetForegroundWindow(h)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement