3

I find no way to send an ALT-code to an application, for example Notepad

from pywinauto import application
from pywinauto.keyboard import SendKeys, KeySequenceError

app = application.Application()
app.start("Notepad.exe")
SendKeys("%(234)") 

This displays "34" to the screen. How can I send the ALT-code for Omega to Notepad?

Dekay
  • 31
  • 2

1 Answers1

1

According to the documentation, the send_keys method supports unicode characters. So, you should in that case be able to simply do SendKeys('Ω'). I can't test this myself at the moment but I don't see why that wouldn't work.

Random Davis
  • 6,662
  • 4
  • 14
  • 24