how can we send keys to keyboard

M

mhangman

how can we send keys to keyboard? i want to write a script that will
push keyboard buttons and do what i want. its for a macro prog. there
are some kinds at c++ and at java. for example actools prog. but i
want to this in python...

note:im not talking about print a key im talking about use it from its
device
please help
 
M

Mike Driscoll

how can we send keys to keyboard? i want to write a script that will
push keyboard buttons and do what i want. its for a macro prog. there
are some kinds at c++ and at java. for example actools prog. but i
want to this in python...

note:im not talking about print a key im talking about use it from its
device
please help


If I understand you correctly, you're probably wanting something like
SendKeys:

http://pypi.python.org/pypi/SendKeys/0.3

Unfortunately, this is for Windows only (as far as I can tell). But
you didn't say what OS you were using, so maybe this will work.

Mike
 
M

mhangman

If I understand you correctly, you're probably wanting something like
SendKeys:

http://pypi.python.org/pypi/SendKeys/0.3

Unfortunately, this is for Windows only (as far as I can tell). But
you didn't say what OS you were using, so maybe this will work.

Mike

ty mike but it use a c++ module with it. cant we find python/made
module?
or donno..

bdw: OS windows, linux doesnt matter just let me learn this
 
M

Mike Driscoll

ty mike but it use a c++ module with it. cant we find python/made
module?
or donno..

bdw: OS windows, linux doesnt matter just let me learn this


What difference does it make if it includes a c file (it's not C++)?
Python itself relies on C code too for some of it's fastest bits. The
"xrange" builtin is one good example. Besides, I think learning C/C++
would be a good idea for any Python programmer that wants to get truly
proficient in his snake charming.

Mike
 
M

mhangman

What difference does it make if it includes a c file (it's not C++)?
Python itself relies on C code too for some of it's fastest bits. The
"xrange" builtin is one good example. Besides, I think learning C/C++
would be a good idea for any Python programmer that wants to get truly
proficient in his snake charming.

Mike

ty mike,
im just looking for other ways which can improve my style,information.
i read some java stuff some c++ some c# and c about this work. but can
python do this whiout include any of this?
need to learn, thanks for helping
 
J

Jason Scheirer

ty mike,
im just looking for other ways which can improve my style,information.
i read some java stuff some c++ some c# and c about this work. but can
python do this whiout include any of this?
need to learn, thanks for helping

You definitely need SendKeys, and you definitely need to talk to
Windows through some C library. It doesn't matter which bridge you
use, but your code is going to touch something written in C eventually
to accomplish this.

Check out this example: http://code.activestate.com/recipes/65107/

The pywin32 libraries are pretty much a must if you're working in
Windows and Python regardless.
 
M

mhangman

You definitely need SendKeys, and you definitely need to talk to
Windows through some C library. It doesn't matter which bridge you
use, but your code is going to touch something written in C eventually
to accomplish this.

Check out this example:http://code.activestate.com/recipes/65107/

The pywin32 libraries are pretty much a must if you're working in
Windows and Python regardless.

ty jason i got my answer^^ i will look for it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top