Simple problem with dicT in Python
I have this dicT in my code that contain some positions.
position = ['712,352',
'712,390',
开发者_StackOverflow社区'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?
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])
精彩评论