python - Send ALT key to inactive window (MS Excel) -


trying menu in excel sending alt. can send normal keys (like 'abc') fine. needs work on inactive menu

i've tried following no luck:

win32gui.postmessage(hwnd, win32con.wm_keydown, win32con.vk_menu, 1) win32gui.postmessage(hwnd, win32con.wm_keyup, win32con.vk_menu, 0) 

tried following variations:

  • hwnd classes: xlmain, excel2, netuihwnd
  • wm_syskeydown instead of wm_keydown. wm_char
  • sendmessage instead of postmessage
  • win32api instead of win32gui


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -