开发者

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])
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜