myang999
asked on
How can I send Key-Stroke, such as <Alt-F> to active application in python?
How can I send Key-Stroke, such as <Alt-F> to active application in python?
I want to send Key stroke such as <Alt-f> to the active application(ex. Acrobat) which has focus.
I want to send Key stroke such as <Alt-f> to the active application(ex. Acrobat) which has focus.
ASKER
Thanks. It works fine.
Just one thing.
If the application was opened already, how can I bring the focus to the app?
In this case, NotePad.
Thanks.
Just one thing.
If the application was opened already, how can I bring the focus to the app?
In this case, NotePad.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much.
Use SendKeys, for example the key string for Alt-F would be "%F"
An example from the above UR which starts notepad then types "Hello World!"L:
Open in new window