Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Noob Python help!

Name: Anonymous 2011-01-02 21:28

How would you make Python press a button? What would you have to type to get the program to "activate" a keyboard button.
like

if input()=='y':
output()= press key (g)

or something like that although obviously the ouput() parts don't exist in Python. Also on that ntoe does anyone know any Python simple syntax dictionaries, IDLE's built in one kinda sucks.

Name: Anonymous 2011-01-02 21:49

[m]R T F M
G T F O
F O A D
D I A F[/n]

Name: *Anonymous 2011-01-02 21:49

R T F M
G T F O
F O A D
D I A F

Name: Anonymous 2011-01-02 22:04

????

Name: Anonymous 2011-01-02 22:19

What do those two mean?

Name: Anonymous 2011-01-03 0:35

bump

Name: Anonymous 2011-01-03 0:56

>>1
Your request makes no sense.  You have to rephrase it in a way that makes sense before I can answer you.

The closest I can get is that you want key "B" to do something, but then you want key "A" to do the same thing key "B" does and maybe something of its own.

Name: Anonymous 2011-01-03 1:59

Ok lets say I'm playing a game and to beat that game I have to press G a lot. As in physically click on 'G'. Now I want to create a simple program that would allow me to just activate it (WITH 'Y'/By clicking Y once) and then it be like I am rapidly clicking on G.

Name: Anonymous 2011-01-03 2:08

H 'Y'/By

Name: Anonymous 2011-01-03 2:08

fuck I meant
TH 'Y'/B

Name: Anonymous 2011-01-03 2:18

A little more?

Name: Anonymous 2011-01-03 2:24

>>1
ONE WORD: THE FORCED INDENTATION OF CODE. THREAD OVER.
READ SICP
LEARN LISP
MASTER C
USE IT

Name: Anonymous 2011-01-03 2:33

I just want this simple program in Python though... Programming is a hobby not a passion for me.

Name: Anonymous 2011-01-03 2:35

Troll.

Name: Anonymous 2011-01-03 2:36

>>13
Learning Lisp is a much more productive and mind-opening hobby.

Name: Anonymous 2011-01-03 3:11

But I want this program in Python 0.0 can someone just tell me what I need to put in I dont want to convert thanks

Name: Anonymous 2011-01-03 3:16

Name: Anonymous 2011-01-03 4:08

I can't seem to phrase it in a way that I get back decent results.

Name: Anonymous 2011-01-03 6:29

>>18
If you're using Windows, from msvcrt import getch. If not, you should be able to figure this out yourself.

Name: Anonymous 2011-01-03 8:55

Program an Arduino robot with servos to press that button for you!
If you add two more servos, two rails, and a map of keyboard, you can make it press any button you want, any at all, not just ``g''!!

Name: Anonymous 2011-01-03 11:16

>>20
Good luck making it produce "$" on a non-faggot keyboard layout.

Name: Anonymous 2011-01-03 11:46

>>21
All my keys are xmodmap'd to ``$'', for typing efficiency.

Name: Anonymous 2011-01-03 12:30

>>21
All my keys are xmodmap'd to ``('' and ``)'', for typing efficiency.

Name: Anonymous 2011-01-03 13:41

>>21
``$'' is not a button, fag.

Name: Anonymous 2011-01-03 17:06

>>1
Eh,  so it would have to send a message (or something like that, a call) to the OS to send out to all of the processes that the button 'G' has been pressed?

Don't change these.
Name: Email:
Entire Thread Thread List