开发者

Simple problem with dicT in Python

开发者 https://www.devze.com 2023-01-11 00:47 出处:网络
I have this dicT in my code that contain some positions. position = [\'712,352\', \'712,390\', 开发者_StackOverflow社区\'622,522\']

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

精彩评论

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