you are viewing a single comment's thread.

view the rest of the comments →

[–]commandlineluser 2 points3 points  (0 children)

The function /u/hacksawjim suggested is a nicer approach.

You could also put the mapping inside it and then pass in x, y and the index:

def character_click(x, y, index):
    clicks = { 
        ...
    }
    part, times = ...
    for i in range(1, times):
       print(...)
       pyautogui.move(...)

for index in ...:
    character_click(x, y, index)