dimanche 27 décembre 2015

Trying to create little program in python, having some issues. (New to coding)

I'm creating a code that will allow for my mouse pointer to go in circles, only when I'm holding down shift on my keyboard.

pyautogui.dragTo(100, 100, duration=0.25)
pyautogui.dragTo(200, 100, duration=0.25)
pyautogui.dragTo(200, 200, duration=0.25)
pyautogui.dragTo(100, 200, duration=0.25)

only when I'm holding shift down.

Would it be best to create a variable in which the value is 1 only when shift is held, then set my loop to only run when the value is 1? Or not even create a variable in general?

Not sure how to translate that into a if/loop statement.

Aucun commentaire:

Enregistrer un commentaire