Python Forum

Full Version: translate this into python plz
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how do i make a bot that does this (just translate to python plz)



(while 1 loop here to keep this script running)


if (p) is pressed, press spacebar , o + 1.

if  o == 50 exit loop and go back to the while 1 loop
(Apr-12-2017, 07:08 PM)abrew132 Wrote: [ -> ]just translate to python plz
What have you tried? Do you have a more specific question?
while 1:
    while True:
        if pressed == 'p':
            press spacebar
            o = o + 1
        if o == 50:
            break
It's a little foggy because of the material you gave.
(Apr-12-2017, 07:31 PM)wavic Wrote: [ -> ]
while 1:
    while True:
        if pressed == 'p':
            press spacebar
            o = o + 1
        if o == 50:
            break
It's a little foggy because of the material you gave.

This does absolutely nothing towards encouraging members to submit their code and their attempts at writing it.