Bruno 'Shady'
Bruno 'Shady'

Reputation: 4516

Simple problem with dicT in Python

I have this dicT in my code that contain some positions.

position = ['712,352', 
            '712,390', 
            '622,522'] 

when I'm trying to run this part

def MouseMove(x,y):
    ctypes.windll.user32.SetCursorPos(x,y)

with MouseMove(position[0]), the compiler says to me that I need 2 arguments on this command... how can I solve this?

Upvotes: 1

Views: 107

Answers (1)

Jeff Mercado
Jeff Mercado

Reputation: 134841

It's not a dictionary but a list. Perhaps you mean to do something like this:

position = [(712,352), 
            (712,390), 
            (622,522)]

MouseMove(*position[0])

Upvotes: 5

Related Questions