By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,517 Members | 1,752 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,517 IT Pros & Developers. It's quick & easy.

Sending keytrokes to Windows app

P: n/a
Hello,

I am trying to control a Windows application from a python script with
SendKeys and Python 2.3. My problem is that the characters ':' and '\'
are sent to the application as ';' and '+'. See code example below.

I suspect that the problem has to do with the regional and keyboard
settings in Windows. I am using the setting English (UK) with Finnish
keyboard. If I change the settings to English (US) with US keyboard,
everything works fine.

Is there a way to either change the language and keyboard settings from
my python script, or get Sendkeys to send the characters correctly? Or
should I use another way to send the keystrokes to the application?

Transcript of Python session:

Python 2.3.5 (#62, Feb 8 2005, 16:23:02) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
import SendKeys
a='C:\\'
SendKeys.SendKeys(a)
C;+


Thank's in advance

Marten Hedman
Turku Centre for Biotechnology
Turku, Finland
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Apr 4, 2005 12:04 PM, Marten Hedman <ma***********@btk.utu.fi> wrote:
I am trying to control a Windows application from a python script with
SendKeys and Python 2.3.


WATSUP might be worth a look, instead...

http://www.tizmoi.net/watsup/intro.html

--
Cheers,
Simon B,
si***@brunningonline.net,
http://www.brunningonline.net/simon/blog/
Jul 18 '05 #2

P: n/a
In article <ma**************************************@python.o rg>,
Simon Brunning <si***@brunningonline.net> wrote:
On Apr 4, 2005 12:04 PM, Marten Hedman <ma***********@btk.utu.fi> wrote:
I am trying to control a Windows application from a python script with
SendKeys and Python 2.3.


WATSUP might be worth a look, instead...

http://www.tizmoi.net/watsup/intro.html

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.